Skip to main content
Nintex Community Menu Bar
Solved

Setting date field based when a different field value is selected

  • December 15, 2022
  • 4 replies
  • 414 views
  • Translate

Forum|alt.badge.img+2

Hello!

I’m having some difficulties with setting a date field to the current date when another control is changed.

Example:

User modifies form and selects “Approved” for form status, the date field should then populate with current date.

I am able to achieve getting the current date value, however, if the form is modified again the date field updates.

I am currently using a rule to cause this date field to update:

 

Any help would be greatly appreciated!!

Best answer by Garrett

Hi @Jamreed 

How is the Form Rules Settings?

 

If your Form Rules is “… when the foam loads...”
The rules you set “IF Status button equals Approved”, then that rule will always Trigger.
[9.30am] User A open form, doesn’t update anything but clicks “Submit” to close form - the rule trigger and updates those 3 values.
[10.00am ] User B open form, doesn’t update anything but clicks “Submit” to close form - the rule trigger and updates those 3 values.

 

Add another Flag “AllowApproveUpdate”. Set value to “YES”.
MODIFY RULES
IF. and “AllowApproveUpdate” = “YES” 
THEN. “AllowApproveUpdate” VALUE = “NO”

 

BEFORE APPROVAL:
Status Button == “” -blank- 
“AllowApproveUpdate” = “YES” 
 

UPON APPROVAL:
Status Button == “YES” 
“AllowApproveUpdate” = “NO”
 

Other changes to the form should not update those 3 values

 

Hope that helps

 

View original
Did this topic help you find an answer to your question?

4 replies

Garrett
Forum|alt.badge.img+16
  • Scout
  • 904 replies
  • Answer
  • December 15, 2022

Hi @Jamreed 

How is the Form Rules Settings?

 

If your Form Rules is “… when the foam loads...”
The rules you set “IF Status button equals Approved”, then that rule will always Trigger.
[9.30am] User A open form, doesn’t update anything but clicks “Submit” to close form - the rule trigger and updates those 3 values.
[10.00am ] User B open form, doesn’t update anything but clicks “Submit” to close form - the rule trigger and updates those 3 values.

 

Add another Flag “AllowApproveUpdate”. Set value to “YES”.
MODIFY RULES
IF. and “AllowApproveUpdate” = “YES” 
THEN. “AllowApproveUpdate” VALUE = “NO”

 

BEFORE APPROVAL:
Status Button == “” -blank- 
“AllowApproveUpdate” = “YES” 
 

UPON APPROVAL:
Status Button == “YES” 
“AllowApproveUpdate” = “NO”
 

Other changes to the form should not update those 3 values

 

Hope that helps

 

Translate

Forum|alt.badge.img+2
  • Author
  • Rookie
  • 8 replies
  • December 15, 2022

Thanks for the reply!

I can confirm, my rules setting is run change when form loads - I’ve implemented the changes but it appears that on existing forms in the SP list, the approval date field is still updating.

I’ve submitted a test form but won’t be able to validate if the date stays the same until tomorrow I suppose.

The rules implemented as described above should prevent the date changing for existing forms, correct? 

Updated Rule:

 

Screenshot of Pre-existing form:

I can see that the “AllowApproveUpdate” did update to No but the approved date is reflecting 12/15 however in the workflow history we can see that it was actually approved on 12/14.

 

Translate

Garrett
Forum|alt.badge.img+16
  • Scout
  • 904 replies
  • December 15, 2022

Hi @Jamreed 

 

Is there another item (from Form) or action (from Workflow) which updates the date?

Is (the Date) which you see in the Form and in the SP column, the same value?

Why don’t you check the SP List Item version history to see when the DATE value was updated. Perhaps it will provide a clue to when and what is updating the value.

 

Translate

Forum|alt.badge.img+2
  • Author
  • Rookie
  • 8 replies
  • December 16, 2022

I checked the sample form that I submitted yesterday, the approval date did not update. I appreciate your assistance on the matter. 

Thanks!

James 

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings