Home › Forums › Modern DFFS › Set Value does not work as expected
- This topic has 2 replies, 2 voices, and was last updated 1 month, 1 week ago by Alexander Bautz.
-
AuthorPosts
-
-
October 3, 2024 at 21:56 #38136
Hi Alex,
This is a two-question post. Please take look and let me know your thoughts.
First Question
————–
I ran into an issue where set value action is not working as expected. Here is the setup.Test 1
——–
Rule trigger: before saving the form
Actions:
1 – Set value of a “Person or Group” field to the current user.
2 – Send an email to the email address associated with field associated with previous step.
Result:
– Field did not get set with the value of current user.
– Email didnt get sent outTest 2
——-
Rule trigger: After form is loaded
Actions:
1 – Set value of a “Person or Group” field to the current user.
Rule trigger: Before form is saved
1 – Send an email to the email address associated with field associated with previous step.
Result:
– Field did get set with correct value
– Email didnt get sent out.
When i debugged this rule, there was no email address in the email “To” property.When I tried the email action with current user, it worked. I know in the above example, I could just use the current user. However, I do have a use case where if the current user is in Admin group, then they can set the “Person or Group” field to someone other than the current user. So I need to use that field.
Second question
————–
Is there a way to trigger a rule if the value of a field equals something but is also different than the original value?Example
Filed type: Yes/No
Rule condition: (on field change) if field value = “Yes”
Action: send an email
Findings
1. If the value was no and it got changed to yes, the email gets sent.
2. If the value was yes and the field didnt get updated, no email is sent.
3. If the value was yes, then the user toggled it to No, then the user toggled it back to yes – Email gets sent (This shouldnt happen) -
October 11, 2024 at 15:21 #38145
Hi Alex,
Can you please provide an update on this? -
October 12, 2024 at 08:34 #38153
Sorry, I thought I had replied, but cannot find my reply anywhere.
I’m not able to recreate the issue with setting a PP and using it in an email as recipient – if you can email me or post some screenshots so I can see exactly how you have it set up I can try to replicate it.
I have added new triggers that will fix the second question by adding a trigger “is changed from initial value” – combine two triggers like this:
AND
— Field is equal to Yes
— Field is changed from initial valueI’ll try to get it published later this weekend or early next week.
Alexander
-
-
AuthorPosts
- You must be logged in to reply to this topic.