Dear community,
I am new to powerapps and want to ask if I could achieve the following functionality:
- let user input some data and after that, send those data as parameters to my custom API with a POST, so that my backend can receive those data as string as manipulate them.
I know that with text input I can save the string as a variable, but I don't know whether is possible to send it to my API endpoint.
Thanks in advance!
Solved! Go to Solution.
Hi @jl_144432 ,
Custom connector can meet your needs.
After the custom connector is created, create a connection.
Add the connection to the canvas app, and finally use the formula of the custom connector and enter the parameters.
Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.
Hi @jl_144432 ,
Custom connector can meet your needs.
After the custom connector is created, create a connection.
Add the connection to the canvas app, and finally use the formula of the custom connector and enter the parameters.
Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.
Thanks for the reply, that also works with a table template right? And where could I replace the string by my variables?
Hi @jl_144432 ,
Do you mean you want to pass a table parameter instead of a string(text) parameter?
If my understanding is correct, you could use the table() function:
Table({Column1:"A",Column2:"B"},{Column1:"C",Column2:"D"})
Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.
nono sorry was saying tablet. I mean where should I put the input parameters as variables? Imagine that I have an api endpoint that connects to api function getweather(string city) and returns me the weather(a string), where should I put the city input?
Hi @jl_144432 ,
I may understand what you mean.
So, according to your description, you are using a get api instead of a post api.
You only need to enter the correct URL with query, and the custom connector will automatically recognize the input (string city).
Hope this link will help you.(This is a weather Api. When you enter a city, it will return the weather of that city)Here
Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.
Thanks!
This does work... in my swagger I defined the parameters that are acceptable and then in my button.onSelect I called my API and passed in the parameters. I was distracted with having to creating a JSON for the body, but it looks like power apps does that for you behind the scene. My solution looked something like this:
testAPI.updateQuestion({id:"123", Description:"aa", CreatedBy:"c", QuestionNumber:"1", QuestionText:["a1","a2"], Education:{Title:"t",URL:"tu", Type:"t"}})
now all I need to do is replace the values with the actual form values such as: TI_Description.Text
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
199 | |
72 | |
50 | |
42 | |
30 |
User | Count |
---|---|
266 | |
121 | |
94 | |
90 | |
81 |