cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Orsini
Regular Visitor

Pass JSON values from text input to Flow

Hi guys!

I'm trying to pass more than one field value from a powerapp to a flow. I have accomplish my test if I use stactic content inside the clearcontent.

This is the function inside a button I use to pass the values: 

 

 

 

Test.Run(JSON(Constituent)

 

 

 

If I use this clearcollect function the previous JSON declaration prompts "Record value expected":

 

 

 

ClearCollect(Constituent;{fullname:Fullname.Text;email:emailaddress.Text})

 

 

 

But If I hardcode the content, the values are sended to flow and the process works:

 

 

ClearCollect(Constituent;{fullname:"Contoso";email:"Contoso@microsoft.com"})

 

 

 

Any idea?

 

Many thanks in advance! 

1 ACCEPTED SOLUTION

Accepted Solutions
yashag2255
Dual Super User II
Dual Super User II

Hey @Orsini 

 

I am not able to replicate the issue shared by you. Though can you try to update the expression as:

ClearCollect(Constituent;Table({fullname:Fullname.Text;email:emailaddress.Text}))

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

4 REPLIES 4
TomasZubov
Resolver I
Resolver I

Hello @Orsini ,

 

 What is in the collection when you use ClearCollect with fields?

Hi @TomasZubov , thanks for your reply.

 

When the fields like below are declared there is nothing in the collection

 

 

ClearCollect(Constituent;{fullname:Fullname.Text;email:emailaddress.Text})

 

 

And the argument in the Test.Run(JSON(Constituent)) is "Argument type text not valid. Record type expected"

 

If I hardcode the values in the clearcollect like below:

 

 

ClearCollect(Constituent;{fullname:"Contoso";email:"Contoso@microsoft.com"})

 

 

In the flow the output is:

 

[{"email":"Contoso@microsoft.com","fullname":"Contoso"}]

 

yashag2255
Dual Super User II
Dual Super User II

Hey @Orsini 

 

I am not able to replicate the issue shared by you. Though can you try to update the expression as:

ClearCollect(Constituent;Table({fullname:Fullname.Text;email:emailaddress.Text}))

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Great @yashag2255 , it's working now 🙂

 

Many thanks you both, have a nice day!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (77,520)