Parent Location

Posted by refael shira on 18-Dec-2016 04:05

Hello,

How do I know If location is the father or not

Explain:

I have locations some with "children" and some without,

I want to know if location it's a father.

Now I can know if location it's a "child" by the "parent location"

Best Regards,

Refael.

All Replies

Posted by Vasantha on 10-Jan-2017 03:16

Hi Refael,

You can use following code to check whether the given location is parent or not.

function test()

{

 var i='{!$ORG_LOCN.name#text}';

 var country = '{!$ORG_LOCN.country#value}';

if (i==country)

 {  

     return "it is a parent";

   }

}

var j=test();

rbv_api.println(j);

Thanks

Vasantha

This thread is closed