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
  • Thank you sparshs for replying!!

    I made the following modification in my code as per your suggestion:

                                                      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:local!fruit,
                                                                                                        saveInto:{local!fruit,
                                                                                                        a!save(ri!fruit,local!fruit)
                                                                                                        }
                                                                                               )
                                                                                              },
                                                                                              buttons:a!buttonLayout(
                                                                                               primaryButtons:{
                                                                                                        a!buttonWidgetSubmit(
                                                                                                        label:"Submit",
                                                                                                         value:"Submit"
                                                                                                        )
                                                                                               }
                                                                                              )
                                                                                     )
                                                                )


    So now when I came back to my task's open instance I didn't get the error.
    Any more suggestions for the same, both Save Changes thing and saveInto local! worked.
Reply
  • Thank you sparshs for replying!!

    I made the following modification in my code as per your suggestion:

                                                      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:local!fruit,
                                                                                                        saveInto:{local!fruit,
                                                                                                        a!save(ri!fruit,local!fruit)
                                                                                                        }
                                                                                               )
                                                                                              },
                                                                                              buttons:a!buttonLayout(
                                                                                               primaryButtons:{
                                                                                                        a!buttonWidgetSubmit(
                                                                                                        label:"Submit",
                                                                                                         value:"Submit"
                                                                                                        )
                                                                                               }
                                                                                              )
                                                                                     )
                                                                )


    So now when I came back to my task's open instance I didn't get the error.
    Any more suggestions for the same, both Save Changes thing and saveInto local! worked.
Children
No Data