Could you please guide me on instructions on what js functions and techniques i can use in this field? Can i write a full function?
What are you trying to achieve?
Check out
No, i mean why can't i do this?
I want to get data from other sql table and based on the vaule in one column replace ids with names
Hard to say because the columns in the table in the screenshot are not clear in what they contain...
Can you post a screenshot of the existing table, and also explain what GetSchools.data looks like? Is GetSchools.data the "data" column in your screenshot?
Javascript inside of {{}}
within component configs should generally be one-liner code. If you want to write multiple lines of code we suggest using Transformers (or JS queries) rather than writing them in-line in {{ }}
. This is useful if you want to do things like filter, transform, and even join different data sets.
For this example, I agree that it would be helpful to see GetSchools.data. Is school
a string? Or, is it an object where you need to reference something like school.name?
Generally speaking, it looks like you need to either remove the {}
around school+'222' or add a return
:
Additionally, since this is an array in a Text column, you may need to add something like [i]
to return just one item per row in the table - or stringify the array
Now it is super clear! thank you so much for clarification!