Button that generates text from an API

0
Hi guys I am really struggling to solve this problem: I am using an API to get random food jokes. I managed to get the api working with the mapping and everything. I want these jokes(text) to be generated and displayed after the user presses a button. I went through the documentation and couldn’t find anything.  I managed to get the api working with the mapping and everything. Could you please help me out?    Thank you!
asked
2 answers
4

 

I would

  1. create a Non persistable entity, with a string attribute.
  2. Add a dataview to the page you want to display the joke.
  3. Set datasource to microflow
  4. Datasource creates a new object based on your Non persistable entity
  5. Add button inside the dataview
  6. Button triggers microflow to call API with input parameter NPE Object
  7. Call API 
  8. Change the Object of the NPE; Sting attribute > Returned API value
  9. Add text widget on the page with parameter the string attribute

 

answered
0

It worked! Thank you for all the help!

answered