MutualFiltration functionality

I encountered an unexpected issue with the MutualFiltration functionality, specifically related to filtering sub-category in InfoMarket elements based on the selected category. This feature had been functioning correctly previously, but it seems to have stopped working without any recent updates or changes from our end.

As per our implementation, the MutualFiltration is supposed to filter the sub-category elements (UsrSousCategorie) based on the relationship between the selected category (UsrCategorie) and its corresponding sub-categories. The filtering logic is as follows: UsrSousCategorie.UsrCategory == UsrCategorie.



Terrasoft.sdk.Model.addBusinessRule("UsrMarketInfo", {

    ruleType: Terrasoft.RuleTypes.MutualFiltration,

    triggeredByColumns: ["UsrCategorie","UsrSousCategorie"],

    connections: [{

    parent: "UsrCategorie",

    child: "UsrSousCategorie",

    connectedBy:

        {

            modelName: "UsrSousCtegorieInfoMarket",

            property: "UsrCategory",

        }

    

    }]

});

Like 0

Like

3 comments

Hello!

 

Could you please provide more information on how this logic has been implemented?

 

Thank you!

Hanna Skalko,

just we need to filter the field sous category with the selected category , show in the lookup filed  the sous-category that

UsrSousCategorie.UsrCategory == UsrCategorie.

sabri krima,

 

Hello,

 

The issue was fixed in terms of a ticket registered on our end. In terms of this issue we've identified that:

 

1) The issue was related to the offline application mode workflow

2) The 

 

connectedBy:

            {

                modelName: "UsrSousCtegorieInfoMarket",

                property: "UsrCategorie",

            }

 

was not needed in the rule

3) UsrCategorie column should've been also specified in the SyncColumns property for the UsrSousCtegorieInfoMarket model (in the ModelDataImportConfig)

4) The namings of the columns should be the same in the parent and child properties. In your case the columns and the rule should've been:

 

UsrSousCategorie.UsrCategorie == UsrCategorie.

Show all comments