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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / PowerAutomate Issue du...
Power Automate
Unanswered

PowerAutomate Issue during Select Variables step - CSV table

(0) ShareShare
ReportReport
Posted on by

Hi Power Automate Community!  Riddle me this (because I am SO confused):

I'm building a flow to take SharePoint form responses and export them into a CSV table.  First, here is the form: 

jessicadduffey_0-1693949352129.pngjessicadduffey_1-1693949404218.png

Expression in Apply to each/Select/Map: 

if(empty(item()?['Value']),'empty',item()?['Value'])
jessicadduffey_2-1693949567658.png

Here are the Select 3 JSON inputs with the relevant response highlighted in red: 

{
"@odata.etag": "\"1\"",
"ItemInternalId": "5779",
"ID": 5779,
"Created": "2021-09-08T19:23:05Z",
"CWID": "nhoma",
"First_x0020_and_x0020_Last_x0020": "Nick Homa",
"Where_x0020_are_x0020_you_x0020_": "Chesterfield, MO",
"What_x0020_are_x0020_the_x0020_t": "Learn more about LGBTQ+ legislation. Already active in ARISE and ARISE Ally leadership. ",
"How_x0020_did_x0020_you_x0020_he": [
{
"@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
"Id": 1,
"Value": "Co-Worker"
}
],
"How_x0020_did_x0020_you_x0020_he@odata.type": "#Collection(Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference)",
"How_x0020_did_x0020_you_x0020_he#Id": [
1
],
"How_x0020_did_x0020_you_x0020_he#Id@odata.type": "#Collection(Int64)",
"BLEND": true,
"BLEND_x0020_Chapters": [
{
"@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
"Id": 11,
"Value": "St. Louis"
}
],
"BLEND_x0020_Chapters@odata.type": "#Collection(Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference)",
"BLEND_x0020_Chapters#Id": [
11
],
"BLEND_x0020_Chapters#Id@odata.type": "#Collection(Int64)",
"Which_x0020_Business_x0020_Resou": [],
"Which_x0020_Business_x0020_Resou@odata.type": "#Collection(Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference)",
"Which_x0020_Business_x0020_Resou#Id": [],
"Which_x0020_Business_x0020_Resou#Id@odata.type": "#Collection(Int64)",
"What_x0020_are_x0020_the_x0020_t0": [],
"What_x0020_are_x0020_the_x0020_t0@odata.type": "#Collection(Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference)",
"What_x0020_are_x0020_the_x0020_t0#Id": [],
"What_x0020_are_x0020_the_x0020_t0#Id@odata.type": "#Collection(Int64)",
"{Identifier}": "Lists%252fBrg%252f5779_.000",
"{IsFolder}": false,
"{Thumbnail}": {
"Large": null,
"Medium": null,
"Small": null
},
"{Link}": "https://bayergroup.sharepoint.com/sites/Inclusion&DiversityNA/_layouts/15/listform.aspx?PageType=4&ListId=cf09d95c%2D1306%2D4183%2Dbddf%2Dc29c5526134b&ID=5779&ContentTypeID=0x0100157911574944A14D8F8F29051925FC72",
"{Name}": "",
"{FilenameWithExtension}": "(no title)",
"{Path}": "Lists/Brg/",
"{FullPath}": "Lists/Brg/5779_.000",
"{ContentType}": {
"@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedContentType",
"Id": "0x0100157911574944A14D8F8F29051925FC72",
"Name": "Item"
},
"{ContentType}#Id": "0x0100157911574944A14D8F8F29051925FC72",
"{VersionNumber}": "1.0"
},
{
"@odata.etag": "\"2\"",

 

From this input, it appears that the response (St. Louis) is pulling in as it should be.  However, look at the output of the Select 3 step: 

[
  {
    "Created""2021-05-17T20:25:38Z",
    "CWID""SHEWL",
    "First and Last Name""Tazeem Dearnley",
    "Where are you located"null,
    "Division"null,
    "What are the top things you hope to get out of BRG participation""",
    "What else do you hope to get out of BRG participation"null,
    "BLEND"true,
    "BLEND Chapters""Berkeley Boston",
    "Preferred Communication Mode"null,
    "Would you be interested in volunteering for US BRG roles"null
  },
  {
    "Created""2021-05-18T12:26:31Z",
    "CWID""GDWXA",
    "First and Last Name""Sarah Dreikorn",
    "Where are you located"null,
    "Division"null,
    "What are the top things you hope to get out of BRG participation""",
    "What else do you hope to get out of BRG participation"null,
    "BLEND"true,
    "BLEND Chapters""Berkeley Boston",
    "Preferred Communication Mode"null,
    "Would you be interested in volunteering for US BRG roles"null
  },
  {
    "Created""2021-05-19T18:09:18Z",
    "CWID""GGOVL",
    "First and Last Name": "Tracy Lea",
    "Where are you located""Whippany",
    "Division"null,
    "What are the top things you hope to get out of BRG participation""",
    "What else do you hope to get out of BRG participation""Top reason:  Culture:  I want to support and enable a more inclusive work environment.   Other reason: possible community engagement with philanthropy and advocacy.",
    "BLEND"true,
    "BLEND Chapters""Berkeley Boston",
    "Preferred Communication Mode"null,
    "Would you be interested in volunteering for US BRG roles"null
  },
 
...and ALL of the BLEND Chapters responses are feeding into the CSV table as Berkeley Boston???
 
Here is a screenshot of the question from the SharePoint form (BLEND Chapters):
jessicadduffey_3-1693950243589.png

 

What could be going on here?  Why is all the data changing to Berkeley Boston in the Select Variables step?

 

Thank you so much for your help - any questions lmk.

Categories:
I have the same question (0)
  • v-xiaochen-msft Profile Picture
    on at

    Hi @jessicadduffey ,

     

    Please try this

    vxiaochenmsft_0-1693969644914.png

    vxiaochenmsft_1-1693969658172.png

    vxiaochenmsft_2-1693969678932.png

    vxiaochenmsft_3-1693969704089.png

    {"Title":@{items('Apply_to_each')?['Title']},"TestLookup":@{body('Join')}}

     

    Best Regards,

    Wearsky

  • jessicadduffey Profile Picture
    on at

    @v-xiaochen-msft sorry, this doesn't appear to be working...

    Screenshots of amended flow: 

    jessicadduffey_0-1694015922482.png

    jessicadduffey_1-1694016004667.png

    jessicadduffey_2-1694016083992.png

    Screenshot of how this feeds into the CSV file:

    jessicadduffey_3-1694016252859.png

    JSON input from Select section: 

     {
                "@odata.etag""\"1\"",
                "ItemInternalId""5334",
                "ID"5334,
                "Created""2021-05-19T18:09:18Z",
                "CWID""GGOVL",
                "First_x0020_and_x0020_Last_x0020""Tracy Lea",
                "Where_x0020_are_x0020_you_x0020_""Whippany",
                "What_x0020_are_x0020_the_x0020_t""Top reason:  Culture:  I want to support and enable a more inclusive work environment.   Other reason: possible community engagement with philanthropy and advocacy.",
                "How_x0020_did_x0020_you_x0020_he": [
                    {
                        "@odata.type""#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
                        "Id"0,
                        "Value""Bayer Intranet Article"
                    }
                ],
                "How_x0020_did_x0020_you_x0020_he@odata.type""#Collection(Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference)",
                "How_x0020_did_x0020_you_x0020_he#Id": [
                    0
                ],
                "How_x0020_did_x0020_you_x0020_he#Id@odata.type""#Collection(Int64)",
                "BLEND"true,
                "BLEND_x0020_Chapters": [
                    {
                        "@odata.type""#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
                        "Id"8,
                        "Value""New Jersey"
                    }
                ],
                "BLEND_x0020_Chapters@odata.type""#Collection(Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference)",
                "BLEND_x0020_Chapters#Id": [
                    8
                ],
                "BLEND_x0020_Chapters#Id@odata.type""#Collection(Int64)",
                "Which_x0020_Business_x0020_Resou": [],
                "Which_x0020_Business_x0020_Resou@odata.type""#Collection(Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference)",
                "Which_x0020_Business_x0020_Resou#Id": [],
                "Which_x0020_Business_x0020_Resou#Id@odata.type""#Collection(Int64)",
                "What_x0020_are_x0020_the_x0020_t0": [],
                "What_x0020_are_x0020_the_x0020_t0@odata.type""#Collection(Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference)",
                "What_x0020_are_x0020_the_x0020_t0#Id": [],
                "What_x0020_are_x0020_the_x0020_t0#Id@odata.type""#Collection(Int64)",
                "{Identifier}""Lists%252fBrg%252f5334_.000",
                "{IsFolder}"false,
                "{Thumbnail}": {
                    "Large"null,
                    "Medium"null,
                    "Small"null
                },
                "{Name}""",
                "{FilenameWithExtension}""(no title)",
                "{Path}""Lists/Brg/",
                "{FullPath}""Lists/Brg/5334_.000",
                "{ContentType}": {
                    "@odata.type""#Microsoft.Azure.Connectors.SharePoint.SPListExpandedContentType",
                    "Id""0x0100157911574944A14D8F8F29051925FC72",
                    "Name""Item"
                },
                "{ContentType}#Id""0x0100157911574944A14D8F8F29051925FC72",
                "{VersionNumber}""1.0"
            },
     
    Screenshot of  portion of JSON output from Select section:
    jessicadduffey_4-1694016609093.png

     

    Any suggestions?  Thank you for your help!

  • Verified answer
    v-xiaochen-msft Profile Picture
    on at

    Hi @jessicadduffey ,

     

    There is no need to use 'select' after 'Apply to each'.

    If you want to add more columns, please add them here instead of using variables in select action.

    vxiaochenmsft_0-1694049704773.png

     

    Best Regards,

    Wearsky

  • jessicadduffey Profile Picture
    on at

    @v-xiaochen-msft , I made this correct and the flow appears to be working well with one exception - passing through "null" values.  What would you suggest here?  Would you recommend this statement in the select step, or something different: 

    if(empty(item()?['Value']),'no response',item()?['Value'])

     

  • v-xiaochen-msft Profile Picture
    on at

    Hi @jessicadduffey ,

     

    It's ok with the expression you provided.

    If you want it to be more perfect, please try:

    if(empty(items('Apply_to_each')?['Column Name']),'no response,'items('Apply_to_each')?['Column Name'])

     

    Best Regards,

    Wearsky

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard