Forum Discussion
SharePoint Event - Participant Registration
- Mar 19, 2023
The flow I mentioned in the previous post looks like this.
After the when a new response is submitted trigger and the get response details action add a get user profile action to get the details of the user who has registered. Then initialise a variable set the type to float.
In your SharePoint list make sure you have a number column for the number of participants registering - for some of our courses a user might register 2 or 3 people from their team. You can set the default to 1.
To count the number of people registered add a set variable action, select the variable and then add the following expression (changing the NumberOfParticipants column to whatever name you've given your number column):
xpath(xml(json(concat('{"root": { value:', outputs('Get_items')?['body/value'], '}}'))), 'sum(//root/value/NumberOfParticipants/text())')Next, add a condition of varCount is less than 25
In the green if yes channel add a create item action to add a new iten into the list. Then add a Send an email (v2) action or a send an email from a shared mailbox action and add the "you're registered" text.
Finally in the red if no channel just add the email action with the "sorry...." text. You could then have a create item action to add this user to another list for a future event.
Rob
Los Gallardos
Microsoft Power Automate Community Super User
The flow I mentioned in the previous post looks like this.
After the when a new response is submitted trigger and the get response details action add a get user profile action to get the details of the user who has registered. Then initialise a variable set the type to float.
In your SharePoint list make sure you have a number column for the number of participants registering - for some of our courses a user might register 2 or 3 people from their team. You can set the default to 1.
To count the number of people registered add a set variable action, select the variable and then add the following expression (changing the NumberOfParticipants column to whatever name you've given your number column):
xpath(xml(json(concat('{"root": { value:', outputs('Get_items')?['body/value'], '}}'))), 'sum(//root/value/NumberOfParticipants/text())')
Next, add a condition of varCount is less than 25
In the green if yes channel add a create item action to add a new iten into the list. Then add a Send an email (v2) action or a send an email from a shared mailbox action and add the "you're registered" text.
Finally in the red if no channel just add the email action with the "sorry...." text. You could then have a create item action to add this user to another list for a future event.
Rob
Los Gallardos
Microsoft Power Automate Community Super User
RobElliott I am having issues with the "Set variable" portion. This is what I am putting in (I have put the name of my number column as the same as what is in the formula): xpath(xml(json(concat('{"root": { value:', outputs('Get_items')?['body/value'], '}}'))), 'sum(//root/value/NumberOfParticipants/text())')