In my Tempo tasks (7.4) I am trying to use cascading dropdowns with rules.

In my Tempo tasks (7.4) I am trying to use cascading dropdowns with rules.
I tried with this code (inputs:type and failure) but it doesn't work (my rule - getFailureDescription works).

= load(
local!type,
local!failure,
a!formLayout(
firstColumnContents: {
a!dropdownField(
label: "Type",
labelPosition: "ADJACENT",
required: true,
choiceLabels: {
"Tread",
"Wire"
},
choiceValues: {
"Tread",
"Wire"
},
value: ri!type,
saveInto: local!type
),
a!dropdownField(
label: "Failure",
labelPosition: "ADJACENT",
required: true,
choiceLabels: {
rule!getFailureDescription(
local!type
)
},
choiceValues: {
rule!getFailureDescription(
local!type
)
},
value: ri!failure,
saveInto: local!failure
)
...

OriginalPostID-96359

OriginalPostID-96359

  Discussion posts and replies are publicly visible

Parents
  • Yes, I did. But I don't want "if" condition because data are taken from a DataBase and are many. In my case, values in first dropdown (for example "Fruits" and "vegetables" in the documentation) are distinct values in a column on DB (I just put 2 of them to try the code but it will be a query rule) and second dropdown contains values got by a query rule with in input the value chose in the first one. Thanks again!
Reply
  • Yes, I did. But I don't want "if" condition because data are taken from a DataBase and are many. In my case, values in first dropdown (for example "Fruits" and "vegetables" in the documentation) are distinct values in a column on DB (I just put 2 of them to try the code but it will be a query rule) and second dropdown contains values got by a query rule with in input the value chose in the first one. Thanks again!
Children
No Data