"I am working with dependent tables, and it's already functioning in the interface. However, when starting debugging in the process model, it throws the following error:
I believe this might be due to the variable in the 'Group' field, which comes from the interface as an integer variable but is presented as text in the user form. Could you guide me on how to handle the configuration of the node or the properties of the Process Model M to fix this error?"
This is what I have in my node configuration
These are the variables on my Process Model´s properties
and this is my rule inputs on the interface
Appreciate your comments.
Regards,
Discussion posts and replies are publicly visible
For me this looks more like an issue with the interface. As dropdowns are pick about the passed value matching the choicevalues in type AND value, you might want to add an if condition to check that the value is present in the choicevalues.
Thank you so much for your reply, I want to share my interface expression, can you guide me on how to use the if condition you are suggesting me to use?
a!localVariables( local!groupData: rule!CFP_GetAllGroupName(), local!nombreGrupo:property(local!groupData,"nombreGrupo", null), local!nombreGrupoId: property(local!groupData,"id", null), local!nombreSubGrupo: rule!CFP_Q_GetSubGroupNameByGroupId( nombreGrupoId: ri!nombreGrupoId ), a!formLayout( label: "Componentes de Inversion", contents: { a!columnsLayout( columns: { a!columnLayout( contents: { a!dropdownField( choiceLabels: local!nombreGrupo, choiceValues: local!nombreGrupoId, label: "Grupo", labelPosition: "ABOVE", placeholder: "--- Seleccione un Grupo ---", value: ri!nombreGrupoId, saveInto: {ri!nombreGrupoId, a!save(ri!nombreSubGrupo,null) }, searchDisplay: "AUTO", validations: {} ), a!dropdownField( choiceLabels: local!nombreSubGrupo, choiceValues: local!nombreSubGrupo, label: "Sub Grupo", labelPosition: "ABOVE", placeholder: "--- Select a Value ---", value: ri!nombreSubGrupo, saveInto: ri!nombreSubGrupo, searchDisplay: "AUTO", validations: {} ),
============================
Thanks a lot, I appreciate it.
a!dropdownField( choiceLabels: local!nombreGrupo, choiceValues: local!nombreGrupoId, label: "Grupo", labelPosition: "ABOVE", placeholder: "--- Seleccione un Grupo ---", value: if( contains(local!nombreGrupoId, ri!nombreGrupoId), ri!nombreGrupoId, null ), saveInto: {ri!nombreGrupoId, a!save(ri!nombreSubGrupo,null) }, searchDisplay: "AUTO", validations: {} ),
BTW, using the same name for local variables and rule inputs with a different purpose can be very misleading.
Thank you,
know I´m getting this other error
contains() only works with data of the same data type. Use tointeger() to cast your local variable from an any type into a list of integers.
Thank you, can you guide me on hw I can set up the code to introduce the to integer() function
contains(tointeger(local!nombreGrupoId), ri!nombreGrupoId),
Excellent, thank you. I overcame the error on the process model, but still, it seems like I have something else to adjust. When I select from the " Grupo" Drop down, the value disappears.
this is my configuration node:
In the "Forms" tab, do you also assign the node variable to the rule input of your interface?
There is no info in the Forms tab, my interface is a start form.
Now It does!!! values on Grupo and subgrupo dropdown stay. I think I´m very close to achieve this.
Now the data on the Grupo and Subgrupo does not pass to the Data store.
Thanks a lot for your guidance, I appreciate it.