Testing an API call. It works, and now to show it

Hello. A query. Create a test api that returns a message (string). As seen in the image, use the on pressed event of the button and on value (promise fulfilled of the API connector). Then I print the value in the log and it works!
But I can’t understand “circuit” to show this on the screen (not in a log)

My idea is to show this string on the screen. how can I do this? What widget allows you to do it?

Hey @claudioc,

Thanks for posting here! so print is for printing on the Log and not on the screen.
To print on the screen, first you need to have a Text widget so the app knows where to show the text and it’s style (font, color, etc)

So do the following:

  • Drop a Text widget
  • Create a variable from the type String and connect the varibale to the text property in the Text widget (check out this page to see more)
  • In Circuit, right-click, then open the section “Locals”, choose the varibale itself, and choose “Set”.
  • Connect the “Set” node for that variable to “value” that you already used for print.
  • Add a node called “Refresh” to thr end of the execution line to update the screen so the new value of the variable will be displayed :slight_smile:
1 Like

I did everything except the “refresh”. Thank you