cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Dual Super User III
Dual Super User III

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
Highlighted
Resolver I
Resolver I

Hello @Orsini ,

 

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

Highlighted

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"}]

 

Highlighted
Dual Super User III
Dual Super User III

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

Highlighted

Great @yashag2255 , it's working now 🙂

 

Many thanks you both, have a nice day!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (11,490)