cancel
Showing results for 
Search instead for 
Did you mean: 

Validation - relationship table

Former Member
0 Kudos

Hello all,

I have a requirement wherein the products assigned to Printer category can not be involved in parent child relationship with other items having category USB devices.

But it can involve in parent child relationship with other category items having category Desktop PC or Laptop PC.

How do I write validation for this scenario?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Abhijeet,

Please have a look to the validation expression below I think it will work.

IF(((ParentProduct Hierarchy.Name = Printer OR ParentProduct Hierarchy.Name = 'USB Device') AND (Hierarchy.Name = Printer OR Hierarchy.Name = 'USB Device')) OR ((Hierarchy.Name = 'USB Device' OR Hierarchy.Name = Printer) AND (ChildProduct Hierarchy.Name = Printer OR ChildProduct Hierarchy.Name = 'USB Device')),FALSE,TRUE)

But one important think Validations will not be triggered Automatically in case of relationships.So you have to trigger it manually.

Regards,

Jitesh Talreja

Former Member
0 Kudos

Thanks Jitesh,

This solved my problem.

If possible could you plz tell me use of syntax category ->(Depth) where category is my Taxonomy table.

Also category ->(Parent)->name & category ->(Child)->name.

How can I use those fields. Is child refers to leaf node?

Answers (0)