I am working a bug and during project creation if the user selects a Large Sto

I am working a bug and during project creation if the user selects a Large Store, Convenience Retail or Drug Value originating channel the selection of project subtype should be an optional (not required) selection. The dropdown selection should not be removed.

Could anyone let me know what could be the logic which I should use so that" Project Subtype"should be optional for Large Store, Convenience Retail or Drug Value originating channel . We are using expression rule "prmOrigChanHasProjectSubType"

=if(contains({cons!PRM_ORIG_CHAN_REGION, cons!PRM_ORIG_CHAN_STORE_LG, cons!PRM_ORIG_CHAN_CONV_RETAIL, cons!PRM_ORIG_CHAN_DRUG_VALUE, cons!PRM_ORIG_CHAN_CANADA, cons!PRM_ORIG_CHAN_OTHER}, ri!origChannel), true(), false())

Also , we have used this expression rule to List of originating channel subtypes for Large Store.

={null(), cons!PRM_ORIG_CHAN_TYPE_REG_CPI, cons!PRM_ORIG_CHAN_TYPE_REG_NONCPI}

Please note the attached screenshot.....

OriginalPostID-119837

OriginalPostID-119837

  Discussion posts and replies are publicly visible

Parents
  • Thanks Evan.. The logic you have provided is not that much clear for me. Could you please elaborate so that I can work on this issue. What could be the contains() portion of my first expression which will suffice instead of the if(<condition>,true,false).
    Second,how I will print out the value of ri!origChannel (at the time of interact with the first dropdown that is CPI or Non-CPI in the Project Subtype dropdown list) and test the contains() expression in an expression editor to make sure the logic is correct.?
    Expression rule "prmOrigChanHasProjectSubType"
    =if(contains({cons!PRM_ORIG_CHAN_REGION, cons!PRM_ORIG_CHAN_STORE_LG, cons!PRM_ORIG_CHAN_CONV_RETAIL, cons!PRM_ORIG_CHAN_DRUG_VALUE, cons!PRM_ORIG_CHAN_CANADA, cons!PRM_ORIG_CHAN_OTHER}, ri!origChannel), true(), false()).
    Expression rule "prmListOrigChanSubTypeByOrigChan"
    =if(ri!origChannel=cons!PRM_ORIG_CHAN_REGION, rule!prmListOrigChanSubTypeRegion(),
    if(ri!origChannel=cons!PRM_ORIG_CHAN_STORE_LG, rule!prmListOrigChanSubTypeStoreLG(),
    if(ri!origChannel=cons!PRM_ORIG_CHAN_CONV_RETAIL, rule!prmListOrigChanSubTypeConvRetail(),
    if(ri!origChannel=cons!PRM_ORIG_CHAN_DRUG_VALUE, rule!prmListOrigChanSubTypeDrugValue(),
    if(ri!origChannel=cons!PRM_ORIG_CHAN_CANADA, rule!prmListOrigChanSubTypeCanada(),
    if(ri!origChannel=cons!PRM_ORIG_CHAN_OTHER, rule!prmListOrigChanSubTypeOther(), ri!origChannelSubTypes))))))
    Expression rule "prmListOrigChanSubTypeStoreLG"
    ={null(), cons!PRM_ORIG_CHAN_TYPE_REG_CPI, cons!PRM_ORIG_CHAN_TYPE_REG_NONCPI}

Reply
  • Thanks Evan.. The logic you have provided is not that much clear for me. Could you please elaborate so that I can work on this issue. What could be the contains() portion of my first expression which will suffice instead of the if(<condition>,true,false).
    Second,how I will print out the value of ri!origChannel (at the time of interact with the first dropdown that is CPI or Non-CPI in the Project Subtype dropdown list) and test the contains() expression in an expression editor to make sure the logic is correct.?
    Expression rule "prmOrigChanHasProjectSubType"
    =if(contains({cons!PRM_ORIG_CHAN_REGION, cons!PRM_ORIG_CHAN_STORE_LG, cons!PRM_ORIG_CHAN_CONV_RETAIL, cons!PRM_ORIG_CHAN_DRUG_VALUE, cons!PRM_ORIG_CHAN_CANADA, cons!PRM_ORIG_CHAN_OTHER}, ri!origChannel), true(), false()).
    Expression rule "prmListOrigChanSubTypeByOrigChan"
    =if(ri!origChannel=cons!PRM_ORIG_CHAN_REGION, rule!prmListOrigChanSubTypeRegion(),
    if(ri!origChannel=cons!PRM_ORIG_CHAN_STORE_LG, rule!prmListOrigChanSubTypeStoreLG(),
    if(ri!origChannel=cons!PRM_ORIG_CHAN_CONV_RETAIL, rule!prmListOrigChanSubTypeConvRetail(),
    if(ri!origChannel=cons!PRM_ORIG_CHAN_DRUG_VALUE, rule!prmListOrigChanSubTypeDrugValue(),
    if(ri!origChannel=cons!PRM_ORIG_CHAN_CANADA, rule!prmListOrigChanSubTypeCanada(),
    if(ri!origChannel=cons!PRM_ORIG_CHAN_OTHER, rule!prmListOrigChanSubTypeOther(), ri!origChannelSubTypes))))))
    Expression rule "prmListOrigChanSubTypeStoreLG"
    ={null(), cons!PRM_ORIG_CHAN_TYPE_REG_CPI, cons!PRM_ORIG_CHAN_TYPE_REG_NONCPI}

Children
No Data