AnsweredAssumed Answered

Script to add new field in table

Question asked by tkroeker on Nov 1, 2017
Latest reply on Nov 2, 2017 by tkroeker

I'm trying to write a script that will allow a user to select 'Other...' in a pop-up menu in a field (Experiment Group) that allows the user to then input text that will appear in that field. If a new record is created, this text should then be a downstream option that always appears in that field.


I do not want to use custom values because the 'Other...' option in custom values does not save this input for new records to use. I also don't want to use the 'Allow editing of value list' feature for pop-up menus because I don't want the entire list to be editable for everyone, just for everyone to be able to ADD a new element to the list.


I created a table "Experiment Group" and created a relationship to link its only field "Group" to the "Experiment Group" field in my original table (Participation Records).


I wrote a script but when I click "Other..." in the Experiment Group pop-up menu it allows me to create a new element for the list, but it doesn't append this element to the table "Experiment Group" (and therefore does not populate the list like I want. Any ideas?


This is my script:


Screen Shot 2017-11-01 at 1.07.39 PM.png


Thanks for your help!