April 22, 2024

SamTech 365

PowerPlatform, Power Apps, Power Automate, PVA, SharePoint, C#, .Net, SQL, Azure News, Tips ….etc

Random Number in PowerAutomate MS Flow

Today I had to deal with a pretty tricky situation,

I was building a flow which captures meetings invites sent to multiple users.

For each user, I had to write into a sharepoint List an event capturing the details of the invite, I also had to include the list of other attendees.

The business solution I was working on, had to write a unique entry for each person, and from each entry, you could see the other attendees.

So my approach was to generate a random number and include it in the notes of each entry, another task or step of the flow was to capture all the events with the same ref (random value) and include in the OtherAttendees lookup (multi-select) the different IDs.

The approach was to hold in a temporary variable a random value as follow:

After validating the attendees against a contact list, the follow will loop over all the valid entries and assign in the otherattendees filed (multiselect lookup) an array of IDs which will link the events together.