web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Data Operations - Sele...
Power Automate
Answered

Data Operations - Select: handle missing mapped columns

(0) ShareShare
ReportReport
Posted on by 2,914

Hi

 

Scenario: I'm using SharePoint - Get Items step to pull back a list of rows from SharePoint. I send the returned Value to a Data Operations - Parse JSON step and take the output from that for a Data Operations - Select step. I then want to put the output of the Select into Create an HTML table and finally return that (to PowerApps).

 

Issue: Some of the columns I'm including in the Select step are optional in the SharePoint list. If all the columns for the Select step are populate, the flow runs fine, but if there are blank columns, the flow will fail.

 

Already tried: I have tried wrapping the mapped values in the Select step within a coalesce function, but that still doesn't run (coalesce can't determine if the column is null because the column is returned from the Parse JSON step).

 

Question: How can I have optional columns in the Select step?

 

Thanks 

Paul

Categories:
  • Verified answer
    v-yuazh-msft Profile Picture
    Microsoft Employee on at

    Hi @PaulD1,

     

    Could you please share a screenshot of the configuration of your flow?

    Why are you add a Operations - Parse JSON step in your flow?

     

    If you don't add a Operations - Parse JSON step in your flow,you could use the If() expression to solve the blank columns problem,and you could create the flow as below:

    Capture.PNG

     

    Note:

    The EndDate field would have blank column in my sharepoint list.

     

    The expression of the EndDate as below:

    if(empty(item()?['EndDate']),null,item()?['EndDate'])

    The flow would run successfully as below:

    Capture.PNG

     

     

    Best regards,

    Alice

  • PaulD1 Profile Picture
    2,914 on at

    Thanks very much Alice

     

    I added a Parse Json step because I'm new to Flow and relying on the 'intellisense' of the Dynamic Content box to help me fill in valid values. Without the Parse Json step I don't get the field names appearing in the Dynamic Content box and as such, assumed some prior processing was required. I'm finding that relying on Dynamic Content to serve up all the possible compatible entries is not a good idea!

     

    Fortunately I can view the item() names I need from my existing Parse Json step to help me fill in a new Select step based directly on Get Items as you suggest. Some of the fields are choice fields and I only want the selected value returned as a string, so some of these item() entries are bit complex.

     

    As someone new to Flow, when should I use Dynamic Content and when not? It often seems to be leading me in the wrong direction!

     

    I'm trying the suggested method now and will report back shortly...

  • PaulD1 Profile Picture
    2,914 on at

    Thanks Alice, I have tested your solution to this issue (empty columns cause a Data Operations - Select step to fail) and this works.

     

    For the simple choice column, the following works.

    If(empty(item()?['Event_x0020_Description']),'',item()?['Event_x0020_Description'])

     

    For the complex/choice columns, I just want the selected value returned, after a little experimentation, this worked for me.

    If(empty(item()?['RiskType']),'',item()?['RiskType']['Value'])

    Thanks again

     

    Any pointers as to when to work with the Dynamic Content box/list would be much appreciated 🙂 

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Also remember, if you want to return text, always use single talking marks.  this tip could have saved me an hour lol

     

    e.g.

    if(empty(item()?['First_x0020_Name']),'Empty','Not Empty')

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 299

#2
11manish Profile Picture

11manish 274 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 119

Last 30 days Overall leaderboard