0 votes
in Rock by TinaStephens (8.6k points)
edited

I have a guest workflow attached to a Family Pre-registration form. I have it adding a First Visit date but it's overwriting existing First Visit Date if a person had a date before. How do I have the workflow check for an existing date?

1 Answer

0 votes
by TinaStephens (8.6k points)
edited
 
Best answer

In the workflow Activity "Process Each Parent" you have a workflow attribute for First Visit Date:

enter image description here

Now you need an action to set the First Visit Date Value:

enter image description here

The lava for the text value is: {% assign per = Activity | Attribute:'Parent','Object' %} {{ per | Attribute:'FirstVisit' }}

Now, add an action to "Set First Visit but add a condition to only run if "First Visit Date" is Blank.

Lava for Date value is: {{ 'Now' | Date:'yyyy-MM-ddTHH:mm:ss' }}

workflow activity

This will add a date for a new person record in the First Visit person attribute. This will not overwrite an existing date on a person profile.

Welcome! Here you can ask questions and receive answers (hopefully) from other members of our team.
...