Dastaset name: “jobs”
‘category’ is a Reference field Key.
When the category field is updated, I would like to copy the Label of the category input (rather than its ID) to a different Text field - ‘newcategory’.
I do need the code to see if the category has changed.
Not sure what “categoriesCollection” is. I need to copy the category labels as a string (text) to a different column (newcategory) in the same dataset (jobs).
Please take a look at the code on my system.
The following code works!
Only the newcategory column in jobs dataset, gets the _id column values from the categories dataset while I want it to receive the title column values (from categories dataset).
jobs - the main dataset containing a category column that is a Reference field & a newcategory which is a text field. categories - a second dataset containing the category Reference field options in the title column.