This discussion is archived
3 Replies Latest reply: Aug 30, 2013 12:30 PM by SubrataG RSS

A question about precedence rule

SubrataG Newbie
Currently Being Moderated

The precedence rule definition "Precedence rules provide a way to delay the display of dimensions until they offer a useful refinement of the navigation state." and the example provided in the developer studio "A precedence rule could be defined so that the State dimension would appear only after a dimension value from the Country dimension is selected." make sense to me. But my question here is, Once the State dimension appeared and I select one State, say NY. Now if I clear the Country dimension 'US' what would happen to the State selection? Should it be cleared as part of deselecting the Country? It looks like to me that the State selection NY is still appearing after I deselect the Country.

 

Thanks,

Subrata

  • 1. Re: A question about precedence rule
    Michael Peel Journeyer
    Currently Being Moderated

    Hi Subrata

     

    That is the expected behaviour - a precedence rule is only intended to control when a dimension is displayed for navigation (by restricting it from being displayed until another dimension or dimension value has been selected), it isn't meant to enforce changes to the selected refinements.  If you want to create a precedence behaviour that enforces "selection">"sub-selection", and removing "selection" also removes "sub-selection", a hierarchical dimension might be a better fit (depending on your use case).

     

    HTH

     

    Michael

  • 2. Re: A question about precedence rule
    Kaush-Endeca Newbie
    Currently Being Moderated

    Subrata,

     

    As Michael said in his reply this is how Precedence rules are supposed to work. You can create a hierarchical dimension to get the desired behavior or if that is not an option you can add logic to your business or presentation layer to remove any sub selection.  One approach that I have seen used is to add a dimension value property (e.g. AlsoRemove=xxxx) to store information about any sub-selection that needs to be removed and then use this information in the presentation layer to remove any sub selections.

     

    IHTH.

     

    Best,

    Kaush

    Kaushik Ruparel

  • 3. Re: A question about precedence rule
    SubrataG Newbie
    Currently Being Moderated

    Thanks Michael and Kaushik for the tips!

    I was thinking a similar option that Kaushik mentioned to handle it in the application. Adding the dimension value property to store the 'dimension id to remove' to use in the application tier is a good idea.

     

    Thanks guys!

    -Subrata

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points