Writing value to a column only once on list item creation
-
08-02-2021 - |
سؤال
Using just SharePoint 2010 and InfoPath (with no access to SharePoint Designer or workflows) can the following be achieved?
List Schema (Simplified):
- Action - Text Field
- Current Target Date - Date Field
- Original Target Date - Date Field
Requirement:
- Use an InfoPath form for entry, only presenting the user with "Action" and "Current Target Date" to populate.
- On record creation the value in "Current Target Date" is also written to "Original Target Date"
- Any further updates to "Current Target Date" would not change "Original Target Date".
Thanks in advance for any help/advise provided.
المحلول
I'm unaware of which version of InfoPath you're using (or if you can use 2013 in 2010 SP)... But with InfoPath 2013 at least, you can create rules on fields. In this case you'd want to set the following:
Create
dateCurrent
anddateOriginal
Date Fields.Go to
Manage Rules
, selectdateCurrent
and create a newAction Rule
.Add Rule:
- The Condition for the rule should be
if dateOriginal is Blank
- The action should be of type
Set a field's value
- Select
dateOriginal
- in the
fx
popup by theValue
field, - select
insert Field or Group
and selectdateCurrent
.
- The Condition for the rule should be
Click OK on all the popups
The field should now update only if it's empty otherwise it'll copy whatever is in the CurrentDate field.
I assume there's a similar concept in InfoPath 2010, however I've never used it to confirm.