Hide button if selection in Multiple Choice
I need to make the button "ESENZIONE BOLLA" appear only if the flag is active on DAF FF 058 PS 2600KG in the dynamic multiple choice field. Otherwise I need to hide it.
How I have to write the formula??
10 replies
-
in the display if section on the button put something like
MCF = "2" or MCF = "3"
note replace MCF with the name of your multiple choice field
This will show the button if either are selected
you don't say if if it is either option or if both selected
so you may need to fiddle with the script
the numbers are the internal position of the choice field
-
Just to be clear, are you talking about a regular multiple choice for a dynamic multiple choice?
-
thomas said:
it's a dynamic multiple choice fieldthen you can try something like:
let x := for loop1 in numbers(dMCfield) do record(dMC-tableName,loop1) end; count(x[fieldName = "DAF FF 058 PS 2600KG"]) > 0
Lines 1 - 3, here is where we use the for loop to go through the dMC selections and then use the record() function to get the record data from the table that the dMC is based on.
Line 4 then checks the new array of records for the specific value of a field that you use to display in the dMC and if the count of records return is greater than 0 then display.
-
thomas said:
But what if the name DAF FF 058 PS 2600 KG in the dmc, referenced to the table AUTOCARRO is composed using this formulaJust treat it like a normal filter:
let x := for loop1 in numbers(dMCfield) do record(dMC-tableName,loop1) end; count(x[Marca = XXX and Targa = XXX and Portata = XXX]) > 0
That is benefit of using records. You have access to all of the data. Though I guess it could slow things down if things are too big, but that is another discussion.
-
thomas if you know which record ID your DAF FF 058 PS 2600KG is on, you can use this formula in the display only section of the button:
contains(numbers('Mezzi pesanti'), 2)
In this example the 2 = the record of the wanted selection...
Content aside
- Status Answered
- 1 yr agoLast active
- 10Replies
- 129Views
-
4
Following