When creating a Motion 2 form that is designed to record multiple submissions by the same user, we recommend setting up a CRM Entity with the "multi" setting turned on. When this setting is enabled, each time the user inputs data designated to that CRM entity, a new entry will be added.
When this type of field is set up in a Motion 2 form, it is often helpful to notify the user or an admin of their latest entry. This use case can be accomplished by using entity variables in a Motion 2 notification, with some specific modifications:
1. Begin creating your notification trigger. Select your variable for the entity field from its repeatable entity:
Example: {$RoleName.0.entities.Entity_Group_1.EntityName.0.field_name}
2. Replace .0 with [$RoleName[0].entities.Entity_Group_1.EntityName|@count - 1]
Example: {$RoleName.0.entities.Entity_Group_1.EntityName[$Role[0].entities.Entity_Group_1.EntityName|@count - 1].field_name}
After each field and variable, test the form to see if the latest submission to the field is displayed properly in the notification. If the variable is not working, open the HTML editor in the Motion 2 notification and double-check the code for errors. You can also re-paste the variable directly into the HTML editor, as this may correct any additional characters that were breaking the code.
Modified on Fri, 29 Sep, 2023 at 11:09 AM
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article