How to set a "many" relationship field with an action #14573
Unanswered
1stthingapps
asked this question in
Help
Replies: 1 comment 1 reply
-
Hey @1stthingapps, Are you trying to set the default value of a relationship field? Do you know if this is for the table within the design area? Currently, it seems for handleBars, you are only able to set one relationship value. The correct syntax to allow you to set multiple should look like the below. I'll write up a bug and edit this message once its done. You can do this by switching to JS and doing something like the below. return ["ro_ta_cXXXXX", "ro_ta_cXXXXX"] This should set the relationship values for you. I hope this helps. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi All- new here so forgive the newby questions! I did search the forum but couldn't find what I was looking for.
I have two tables "Companies" and "People" with a one-to-many relationship between the two. I show a list of people in a table and I simply want that a user can select from the list of People and add them as employees to the chosen Company. However, I can't work out how to refer to the People when adding them using handlebars. I assume it's an array of _ids but I just can't get it to work. I can add one, but cannot work out how to specify more than one (I can manually add several directly on the data back end so no issue with structure).
I've tried:
[ { "_id": "ro_ta_cXXXXX", }, { "_id": "ro_ta_cYYYYY", } ]
[ { "ro_ta_cXXXXX", "ro_ta_cYYYYY" } ]
{ "ro_ta_cXXXXX", "ro_ta_cYYYYY" }
... and a few others that made no sense but no luck.
Any suggestions?
Beta Was this translation helpful? Give feedback.
All reactions