How can I return data from the database to a paragraph item in the UI

Hi! I have a database that contains motivational quotes. I can run it successfully in the database and get the expected results.


image

My goal is to display the quote based on the user login, however I’m not sure if I should be using a collection of data records or a single data record. I also currently have a data variable connected to a page parameter id.

I can run a single data record Get Record test based of the id successfully, and get it to display on the UI.


However, it is blank and doesn’t appear when I open it on my phone

Can anyone assist? Am I on the right track?

You are on the right track :wink: .

  • as you demonstrated with the GET RECORD test run, the data source is connected to your app.
  • my assumption is, that your data variable is just not filled correctly because of a lacking id. Maybe you define the variable containing the id only after the data variable is filled.
  • You can find out the real reason with the classic debugging approach.
    a) use ENCODE_JSON() in the formula function to display the content of your variables in paragraphs.
    b) connect all outputs of your logic nodes to alerts, that show error messages. Include the logic within the data variable in this approach.

Thank you! I was able to get it to work by including the paragraphs in a collection and then associating each quote to the individual id in my user table.