multiple choice: delete option and set option on create new record
I'm sure that until recently it was possible to delete a row from the options of a multiple choice field. Now I can only edit the text and re-order the options. Is it me or has something changed?
Also I've been trying to set initial options for mc field as part of a "trigger on new record" action. This does not seem possible, although I can do it by adding the same code to an after update action. Any ideas on how to force an opening value(s) to an MC from an on new record action?
8 replies
-
I'm sure that until recently it was possible to delete a row from the options of a multiple choice field. Now I can only edit the text and re-order the options. Is it me or has something changed?
If it is a simple multiple choice (MC) field, there is only one way to edit the choices and that is to manually edit the choices.
If it is a dynamic MC field, then you can just change which records you gather.
Also I've been trying to set initial options for mc field as part of a "trigger on new record" action. This does not seem possible,
To set MC field (simple or dynamic), you only need to build an array of the numeric choices. For simple MC fields, the choice number is what is shown in the Edit Field. In dynamic MC, the choice number is the record Id.
If you had a simple MC with 5 choices and want to set choices 1 and 4 on every new record you can do:
multichoicefield := [1,4]
-
said:
I think, by clicking a bin icon, but there doesn't seem to be a way of doing this nowIt has been awhile since I tried to delete choices. You click on the name and then you will see a trash can icon.
said:
On creating a new record in table two I would like the on new action to copy the values of T1MC to T2MC. It doesn't happen. Clicking on the Button on T2 does it. Why doesn't the on new work?You got very close. You wrote:
MC1 := Table1.T1MC
Great use of relationship fields to get your data.
Now to your issue. Like I said earlier, you need an array of numbers.
If you create a new formula field in Table2 and put this in it:
debugValueInfo(Table1.T1MC)
you will see something like, depending on the selections made:
multi("3")
That is not an array of numbers. To fix this you just need to use the numbers() command. So if you change the new formula field to:
debugValueInfo(numbers(Table1.T1MC))
you should see something like:
number([1,2])
Now that is an array of numbers. So then you can change your button to:
MC1 := numbers(Table1.T1MC)
And it should work.
-
said:
The question is really how to set the MC field as part of the code in an add new record trigger. It doesn't seem to work.If you are initiating from table2 then it is doing exactly what you want. The problem is the link to table1 has not been established. If you create the new table2 record from table1 then it will work fine.
Content aside
- 3 mths agoLast active
- 8Replies
- 42Views
-
2
Following