cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Aysan
Helper II
Helper II

Copy the result of API query to another table

Hi,

As a newbie in powerapps, I could finally create a customer API connector and am able to create a collection with the result of query:

 

Aysan_0-1615333495570.png

the challenge that I have now is to grab information as they are inside the "results"

Aysan_1-1615333565775.png

as this is a test app I simply have a button with the formula as :

ClearCollect(ZDtickets,Connector._1({query:"organization:"& TextInput1.Text & " type:ticket"}));

 

 

Any help is much appreciated

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @Aysan ,

 

Could you tell me:

Do you want to call the api multiple times?(Press the button multiple times?)

Do you want to save the values returned multiple times in one collection?

 

If my assumption is correct, please use collect() function instead of clearcollect() function.

 

1\ Add a button control and set its onselect property to:

Collect(ZDtickets,Connector._1({query:"organization:"& TextInput1.Text & " type:ticket"}));

// Collect data multiple times

 

2\ Add a button control and set its onselect property to:

ClearCollect(TestCollection,Ungroup(ZDtickets,"results"))

// Expand the value of the result column

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

 

View solution in original post

2 REPLIES 2
v-xiaochen-msft
Community Support
Community Support

Hi @Aysan ,

 

Could you tell me:

Do you want to call the api multiple times?(Press the button multiple times?)

Do you want to save the values returned multiple times in one collection?

 

If my assumption is correct, please use collect() function instead of clearcollect() function.

 

1\ Add a button control and set its onselect property to:

Collect(ZDtickets,Connector._1({query:"organization:"& TextInput1.Text & " type:ticket"}));

// Collect data multiple times

 

2\ Add a button control and set its onselect property to:

ClearCollect(TestCollection,Ungroup(ZDtickets,"results"))

// Expand the value of the result column

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

 

View solution in original post

Thank you so much! that worked, will this also work if I had more than 1 result?

this is what I used and it worked, I am wondering if the ZDtickets returns more than 1 count of results, will I have a ZDresult table with more rows?

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 (36,613)