Question on using SAIL to pull information from DB

Hi

I am working on version 16.1.

I have a scenario where I want to display names of fruits in my drop down on SAIL whose values I am getting from DB.
In DB there are four distinct fruit names i.e. Apple, Orange, Banana, Mango and I am fetching these values via. query rule on my SAIL interface itself.
The SAIL interface rule is:
                                                                      load(
                                                                                 local!fruit,
                                                                                 local!dropDownValues:union(rule!Get_FruitData().fruitname,rule!Get_FruitData().fruitname),
                                                                                 a!formLayout(
                                                                                          label:"Drop Down Test",
                                                                                          firstColumnContents:{
                                                                                           a!dropdownField(
                                                                                                    label:"Fruit Names",
                                                                                                    placeholderLabel:"Select a fruit",
                                                                                                    choiceLabels:local!dropDownValues,
                                                                                                    choiceValues:local!dropDownValues,
                                                                                                    value:ri!fruit,
                                                                                                    saveInto:{ri!fruit
                                                                                                    }
                                                                                           )
                                                                                          },
                                                                                          buttons:a!buttonLayout(
                                                                                           primaryButtons:{
                                                                                                    a!buttonWidgetSubmit(
                                                  ...

OriginalPostID-211459

OriginalPostID-211459

  Discussion posts and replies are publicly visible

Parents
  • ...                                                   label:"Submit",
                                                                                                         value:"Submit"
                                                                                                        )
                                                                                               }
                                                                                              )
                                                                                     )
                                                                          )

                                                                          
    Now I have run 1 instance of my PM and from this drop down I selected Mango and rather than submitting the form, I have clicked on Tasks Tab i.e. left the form as it is after selecting Mango from it.
    Now before reopening the form, I have removed Mango from backend and then when I try to open the form, I get an error (PFA screenshot).
    This error is expected as there is now a discrepancy between choice labels and choice values.
    Is there a way to handle such a situation.

    Thanks in advance!!
Reply
  • ...                                                   label:"Submit",
                                                                                                         value:"Submit"
                                                                                                        )
                                                                                               }
                                                                                              )
                                                                                     )
                                                                          )

                                                                          
    Now I have run 1 instance of my PM and from this drop down I selected Mango and rather than submitting the form, I have clicked on Tasks Tab i.e. left the form as it is after selecting Mango from it.
    Now before reopening the form, I have removed Mango from backend and then when I try to open the form, I get an error (PFA screenshot).
    This error is expected as there is now a discrepancy between choice labels and choice values.
    Is there a way to handle such a situation.

    Thanks in advance!!
Children
No Data