hello ,
I have a table Shop
and I decided to display the name of the country to make it easier to the user.
But with that, I cannot create a row thru the API using the ID of the country.
I have to use the name as a string âFranceâ to make the request working.
Is that how itâs suppose to work ?
class Shop:
name = grist.Text()
url = grist.Text()
country = grist.Reference('Country')
Previously, most people had the opposite problem and couldnât understand why they had to send a number instead of âFranceâ
So we made the API interpret strings according to the selected âShow columnâ, i.e. ânameâ in this case. You can either:
Tell n8n to interpret âField Valueâ as a number instead of a string, so that the JSON says "country": 1 (no quotes) instead of "country": "1". Not sure if they actually allow this.
Change the âShow columnâ to Row ID, in which case it should parse strings containing numbers the way you want. You can then use a formula column to display the name. But I know thatâs not great either.
haha oki I see
yeah itâs just because âRow IDâ will never change unlike other fields, otherwise, the day I change the âSHOW COLUMNâ
the API will fail ^^â
And if I change the âShow columnâ to Row ID, I wonât have the list with the name.
Concerning n8n, you were right,
by doing â{{parseInt(â1â)}}â, itâs working perfectly, thank you