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 / building an expression...
Power Automate
Unanswered

building an expression using concat

(0) ShareShare
ReportReport
Posted on by 31

Hello,

I've built a flow which is triggered by a form.  On the form I collect property type (House) and number of bedrooms (5) and create an item on a sharepoint list

I then concat those answers together to get House5

I would like to use House5 as part of the expression below to retrieve a value from another sharepoint list

outputs('Get_item')?['body/House5']

And so if the form answers were Flat and 2 the resulting expression would then read as -

outputs('Get_item')?['body/Flat2']

I then want to retrieve that value.

 

Many thanks for any help.

 

Categories:
I have the same question (0)
  • PrasadAthalye Profile Picture
    on at

    You can concat like this using Compose and then use Compose wherever you would like... In the below example, I am concatenating answers from 2 questions. Since your 2nd question is Int, May be you can convert it to string by wrapping it in string ( ) function.

    concat(outputs('Get_response_details')?['body/rd7f84d633bd24b01bd831a1128630b83'], outputs('Get_response_details')?['body/submitDate'])

     

     

  • Displaced_2000 Profile Picture
    31 on at

    Many thanks, I've actually already achieved that part, sorry if my question was not entirely clear.

     

    I want to use the result of that concatenation in another expression

    So if the result was House5, how do I construct and use that as part of another expression like below?

    outputs('Get_item_LA')?['body/House5']

     

    I've done the below using compose, this generates the correct coding I need, but I can't seem to execute that to retrieve the value of body/House5?

     

    Displaced_2000_0-1619775413863.pngDisplaced_2000_1-1619775442604.png

     

    When I put the two versions side by side, the output of the compose and then the normal link to the house5 field

    The compose returns the expression (GREEN), while the normal link returns 75020 (BLUE)

     

    I want the compose to generate the expression and return me 75020 if possible?

     

    Displaced_2000_2-1619775541453.pngDisplaced_2000_3-1619775585417.png

     

     

     

     

  • Verified answer
    PrasadAthalye Profile Picture
    on at

    Ok Understood. Reason your compose isn't working because its not an expression. Its a plain text.

     

    This is definitely not straight forward since you would like to make it dynamic. Best Option is to leverage REST APIs where you can manipulate string payload and write that in select clause.

     

    There is one other option possible using Get Items. See below if it can be of help ..

     

    PrasadAthalye_0-1619784854037.png

     

    Below is my expression for item... 

     

    item()?[ variables('DyamicColumn')]

     

  • Verified answer
    Displaced_2000 Profile Picture
    31 on at

    Many thanks for your support with this issue.

    I tried to adopt your suggestion above using the SELECT function but I wasn't able to see how it would work in my scenario.

     

    I've managed to sort my issue, albeit probably not in the most eloquent way.  I've nested if statements. It looks a mess but does what I need it to do for now.

     

    Thanks again for your help.

     

     

    if(equals(concat(outputs('Get_Property_Type')?['body/PropertyType'],outputs('Get_response_details')?['body/r16485acb4b4c437c966b09aebdc49e3f'],outputs('Get_response_details')?['body/rba5ca66e8c034ef5aa0c6c1743acc957']),'House6'),outputs('Get_item_LA')?['body/House6'],if(equals(concat(outputs('Get_Property_Type')?['body/PropertyType'],outputs('Get_response_details')?['body/r16485acb4b4c437c966b09aebdc49e3f'],outputs('Get_response_details')?['body/rba5ca66e8c034ef5aa0c6c1743acc957']),'House5'),outputs('Get_item_LA')?['body/House5'],if(equals(concat(outputs('Get_Property_Type')?['body/PropertyType'],outputs('Get_response_details')?['body/r16485acb4b4c437c966b09aebdc49e3f'],outputs('Get_response_details')?['body/rba5ca66e8c034ef5aa0c6c1743acc957']),'House4'),outputs('Get_item_LA')?['body/House4'],if(equals(concat(outputs('Get_Property_Type')?['body/PropertyType'],outputs('Get_response_details')?['body/r16485acb4b4c437c966b09aebdc49e3f'],outputs('Get_response_details')?['body/rba5ca66e8c034ef5aa0c6c1743acc957']),'House3'),outputs('Get_item_LA')?['body/House3'],if(equals(concat(outputs('Get_Property_Type')?['body/PropertyType'],outputs('Get_response_details')?['body/r16485acb4b4c437c966b09aebdc49e3f'],outputs('Get_response_details')?['body/rba5ca66e8c034ef5aa0c6c1743acc957']),'House2'),outputs('Get_item_LA')?['body/House2'],if(equals(concat(outputs('Get_Property_Type')?['body/PropertyType'],outputs('Get_response_details')?['body/r16485acb4b4c437c966b09aebdc49e3f'],outputs('Get_response_details')?['body/rba5ca66e8c034ef5aa0c6c1743acc957']),'House1'),outputs('Get_item_LA')?['body/House1'],''))))))

     

      

  • Verified answer
    Displaced_2000 Profile Picture
    31 on at

    @PrasadAthalye  I went back and revisited your suggestion using select and finally figured it out, which has given me a cleaner solution which is more understandable for other users when reviewing the flow.

     

    So for anyone else with a similar issue, this is what I've ended up doing to achieve my desired outcome.

     

    Displaced_2000_0-1620204375824.png

    Displaced_2000_1-1620204422646.png

    Displaced_2000_2-1620204458202.png

    int(first(variables('Get LA Value'))?[outputs('PROPBEDS')])

     

    Many Thanks

     

  • PrasadAthalye Profile Picture
    on at

    Great !! Happy that you managed to resolve the issue. Can you please accept the solution for this thread to close it?

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