Fit Fam example forms

Certified Lead Developer

HI,

I want to expand the drop down list of available forms in the Fit Fam application, to include some of own interfaces.

This is currently driven by the expression rule FFM_formNamePairs, which is essentially a succession of if statements

e.g. 

if(exact(ri!formName,"Component Mix"),rule!FFM_testForm1(),
if(exact(ri!formName,"Company Information"),rule!FFM_testForm2(), 
if(exact(ri!formName,"The Bird Nest"),rule!FFM_testForm3(),
if(exact(ri!formName,"Picker Field Test"),rule!FFM_testForm4(),
if(exact(ri!formName,"User & Grids"),rule!FFM_testForm5(), 
if(exact(ri!formName,"Person Entry"),rule!FFM_testForm6(),

This does not seem to be particularly scalable, so I was wondering if anyone has come up with an alternative to populate the drop down, that includes the ability to to pass rule inputs into the form. 

Also note the above expression will return a FormLayout (System Type) data type.

 

Thanks

  Discussion posts and replies are publicly visible

Parents
  • Hi,

    You can also achieve this scenario using displayvalue and choose.

    =load(

    local!chooseValue:
    displayvalue(
    ri!formName,
    { /* Use Constant*/
    "Component Mix",
    "Company Information",
    "The Bird Nest",
    "Picker Field Test",
    "User & Grids",
    "Person Entry"
    },
    {
    1,2,3,4,5,6
    },
    7 /* Default value */
    ),

    choose(
    local!chooseValue,
    rule!FFM_testForm1(),
    rule!FFM_testForm2(),
    rule!FFM_testForm3(),
    rule!FFM_testForm4(),
    rule!FFM_testForm5(),
    rule!FFM_testForm6(),
    {} /* default */
    )

    )

    Thanks
Reply
  • Hi,

    You can also achieve this scenario using displayvalue and choose.

    =load(

    local!chooseValue:
    displayvalue(
    ri!formName,
    { /* Use Constant*/
    "Component Mix",
    "Company Information",
    "The Bird Nest",
    "Picker Field Test",
    "User & Grids",
    "Person Entry"
    },
    {
    1,2,3,4,5,6
    },
    7 /* Default value */
    ),

    choose(
    local!chooseValue,
    rule!FFM_testForm1(),
    rule!FFM_testForm2(),
    rule!FFM_testForm3(),
    rule!FFM_testForm4(),
    rule!FFM_testForm5(),
    rule!FFM_testForm6(),
    {} /* default */
    )

    )

    Thanks
Children
No Data