cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Forsaken_Shoe
New Member

Getting a string from one of two arrays

Hello, I have a question regarding variables in Power automate. I have created 2 arrays:

Forsaken_Shoe_0-1627649864783.png

 

I then make a variable where I combine the two with the following expression:

union(
outputs('Cars1'),
outputs('Cars2')
)

Forsaken_Shoe_1-1627649864787.png

 

I then want to use the Contains() expression to see if "Audi" is in one of the arrays. For this i use

contains(
outputs(variables('AllCars1'),'audi')
)

Forsaken_Shoe_2-1627649864625.png

 

 

But this does not work. The followin error message shows in the banner. Need help to figure out what I am doing wrong

 

 

Forsaken_Shoe_4-1627649864660.png

 

Thanks for any help! 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-LilyW-msft
Microsoft
Microsoft

Hi @Forsaken_Shoe 

Has your problem been solved?

I test on my side and found there is a problem with the formula in Compose.

Please change

contains(
outputs(variables('AllCars1'),'audi')
)

to: 

contains(variables('AllCars1'),'audi')
and try again.

Hope the content above may help you.

Best Regards

If my solution helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Powerplatform01
Post Patron
Post Patron

@Forsaken_Shoe 

Could you please refer this video. Also request you to please subscribe this channel.

🙏

 

https://youtu.be/OIIjOy-p-UE

v-LilyW-msft
Microsoft
Microsoft

Hi @Forsaken_Shoe 

Has your problem been solved?

I test on my side and found there is a problem with the formula in Compose.

Please change

contains(
outputs(variables('AllCars1'),'audi')
)

to: 

contains(variables('AllCars1'),'audi')
and try again.

Hope the content above may help you.

Best Regards

If my solution helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (2,936)