Select to view content in your preferred language

Populating NA in Microsoft Lists using Power Automate from blank Survey 123 fields

437
1
03-31-2024 07:27 PM
spf999
by
New Contributor II

I am creating a Microsoft List database from the submissions from my Survery123 form. I currently have a Survey123 triggered Power Automated Flow set up where, samples with more than one replicate (each have their own unique replicate name) are their own line item. I want to have these lines updated to populate NA in fields that are left blank in the Survey123 Form. I have figured out the flow for samples with only one replicate but am having issues with the repeated attributes for replicates more than 1. I have attached a copy of my Survey 123 form XLSX as well as some screen shots for my existing flow.

I know that these NAs should populate using the conditional step where <blank field> is equal to null. However, I believe the issue is lying within the Apply to Each step, as I cannot figure out which dynamic content to choose to make the flow identify the replicate names. I have tried using the dynamic content "feature repeats Replicate Information attributes Field Replicate Name" as this is the only unique identifier between replicate samples. However, when selecting this option in the Apply to Each step, this specific dynamic content no longer becomes available in the Sharepoint Update Items step.

I do not want to alter my Survey123 form to have NA as a default answer if this can be avoided, as I will have other Survey 123 forms that will eventually feed into this Power Automated Flow in the future. 

Thank you in advance! 

0 Kudos
1 Reply
abureaux
MVP Frequent Contributor

What fields in the XLSX are you trying to work with specifically?

Right now, I'm thinking you have two main options:

  • In S123, you can use coalesce() to add the "NA" within S123 so your fields always have data. This could simplify your PA process. E.g., coalesce('NA',${replicate_field})
  • In PA, you can use an expression to test a field for null and conditionally add data. E.g.,
    if(empty(triggerOutputs()?['body/feature/attributes/example1']),'NA',triggerOutputs()?['body/feature/attributes/example1'])
    EDIT: I realized that the PA expression probably doesn't make a lot of sense if you've never seen it before, so I added coloring. In your case, Red=Universal (don't change) and Blue=Dynamic (change these to be your desired fields).
    abureaux_0-1712068360195.png
    abureaux_1-1712068463746.png

     

     

0 Kudos