After form reload, choice field shows value instead of label

Community Alums
Not applicable

Hi there,

I'm working on a custom table with a choice field that gets its options dynamically filled by a Client Script that way:

g_form.addOption('<field>', <name of a table>, <label the table>);

When I open the dropdown, I see the labels as expected. But when I save the form, I suddenly see the name instead.

Example: I select "Story", but after saving, I see "rm_story".

Does anyone have an idea what I may be doing wrong?

Best regards,

Kosh

1 ACCEPTED SOLUTION

I was referring to the fact there is a Table Name field type that you can use for the field.  You can then look at using an INSTACEOFtask filter to get just tables that are child of task.

View solution in original post

17 REPLIES 17

Looking at your code are you trying to get the tables that are a child of task and the table is story?  If so you can just use 

nameINSTANCEOFtask

Since story is a child of task that will automatically be included.  Your current query will only return the first child of task, nothing below that, which you may want, I'm not sure.

 

I was referring to the fact there is a Table Name field type that you can use for the field.  You can then look at using an INSTACEOFtask filter to get just tables that are child of task.

Community Alums
Not applicable

That's brilliant, thank you! Now I could even remove the Script Include and put that simple filter directly on the Reference field. 🙂