AnsweredAssumed Answered

Survey123 & Power Automate - auto increment unique ID for survey response to avoid duplicates of edited survey responses

Question asked by Summer.Koszti@fireandemergency.nz_nzfireservice on Oct 14, 2020
Latest reply on Oct 15, 2020 by anthony.jones_RSK_EPD

Hi Team, 

 

I need some help with the below and would appreciate any help / advice. 

 

I have a created a survey whereby our personnel collect information from around the community using mostly the Survey123 mobile phone application. 

 

When a survey response is submitted the information is displayed in a webmap, and using power automate it is also collated to an excel spreadsheet - this all works fine.

However, when a survey response undergoes an edit, currently it duplicates, adding another row with all attributes, including the edited attribute to the excel spreadsheet. 

 

What I want to do is update the row of the initial survey response - not add a row. 

The solution I had is to ensure each survey response has a unique ID that is automatically generated (I have no idea how to do this, or if I can use an object ID etc) ....

and then set a condition in power automate that once a survey response is submitted it checks to see if the Unique ID is already in the excel spreadsheet:

If it IS NOT, it adds a row

If it IS, it updates the attributes that requires updating

 

So my question is - will this work? and if so, what is the best way to go about creating a unique ID that automatically generates for each survey submitted? Or can I use the GlobalID somehow to do this? 

Or if any one has come across a similar issue how did you go about fixing the solution. 

 

Thanks, 
Summer 

Outcomes