How do I show the output of this API in studio?
I don’t quite understand how plasmic’s code editor works. If I do alert(), I can get the output returned to my browser. How can I get this to appear in my table? I essentially want to take a post/zipcode and output it’s relevant council.
If you are using this as a get request you can make a data query
Then in the table component you can connect to the output of this data query
But how do I get it to return the relevant postcode for currentItem in the table?
I can set a single prop in the query URL but can I query according to each current item?
Hover over custom value you will see the green Thunder sign click on that then click on code editor and you will be able t concatanate your desired string
Im super familiar with using dynamic values and the code editor, but how do I do this here? I can easily go into the data picker and see the output of this API, but I want the API to return something different according to which row I’m on
what I was suggesting you do in the code editor us
“http://myapiurlhere.com/“ + current.Item.postcode
Copy and paste that in the code editor available after clickung that thunder sign.
This will
Make sure that every row will have their unique value
@even_vole
But I’ve already showed the outcome of that in my first message here
If I fetch via API in the code editor, I get Promise {} - I’m asking how to show the output
Yes and what I told you to use is not fetch.
I told you to use a data query instead and to use the output of the data query either in a table/ list rendering element and then you will be able to access each individual item.
Or if you dont want to do that, use the “data fetching component”
But I don’t want the output of that data query in a table.
• I have my existing data from an SQL database in a table.
• One of the fields in that database is “Postcode”
• I want that column of the table to return content from a postcode validator API, using the postcode from my SQL database as the query.
This just returns the API URL as a string. What was it you were trying to do with the copy and paste thing you mentionend?
In that case put a data fetcher component in your table list items is that possible?
If not instead of using table
Create a flex horizontal item and do a repeater
Then inside of that, use the data fetching component