List of Locations related to the Country (146 Views)
Reply
Frequent Advisor
Rohitsinha1706
Posts: 77
Registered: ‎02-25-2013
Message 1 of 11 (146 Views)

List of Locations related to the Country

 

 

Hi Experts,

 

When I have selected the country name then related location of that particular company should appear in the list.

 

Suppose if I select country name as India then in the list related location should appear for India.

 

Please suggest me on the same.

 

 

Thanks and Regards,

Rohit

 

 

Please use plain text.
Advisor
Nancy_Raj
Posts: 16
Registered: ‎12-26-2012
Message 2 of 11 (142 Views)

Re: List of Locations related to the Country

Create a link line that will query the location table with the where the Query=$query

 

In the expressions use:

if (not null(country in $File)) then ($query="name#\""+country in $File+"\"")

Please use plain text.
Frequent Advisor
Rohitsinha1706
Posts: 77
Registered: ‎02-25-2013
Message 3 of 11 (123 Views)

Re: List of Locations related to the Country

 

 

Hi Sir,

 

 

I have created the location field value as "current.location"  in SD.open.interaction form and for this when selected the country name as India then related locations should appear for this field value.

 

Can you please suggest how can I able to get that i.e please specify the query and expressions.

 

Thanks in Advance

 

Regards,

Rohit

 

 

Please use plain text.
Advisor
AChandler
Posts: 25
Registered: ‎09-17-2010
Message 4 of 11 (114 Views)

Re: List of Locations related to the Country

The best way to do this, as Nancy has already said, is with a link query.

 

You should have FieldA for country on the form.

You should have FieldB for location on the form, beneath country.

The FieldA control on the form should be a Comfill with Combo Button and Third Button not visible.

The FieldB control on the form should be a Comfill with Combo Button and Third Button not visible.

 

In the Interactions Link (the file named incidents on the link table), you should have a line for country which links to the country table, and you should have a line for location which links to the location table. In the line for location, you should use the query which Nancy has already given you.

Please use plain text.
Frequent Advisor
Rohitsinha1706
Posts: 77
Registered: ‎02-25-2013
Message 5 of 11 (104 Views)

Re: List of Locations related to the Country

 

Hi Sir,

 

I have created the country field with input value 'country'  as shown in screenshot 1 and location filed with input value 'current.location' as shown in screenshot 2.

 

In links,selected the SD.open.interaction link as shown in screenshot 3 and  wrote the query in as shown in screenshot 4.

 

I am not able to get the solution,please check the screenshots and suggest me.

 

 

Thanks in Advance

 

 

Regards,

Rohit

 

 

Please use plain text.
Valued Contributor
mahesh428
Posts: 280
Registered: ‎07-14-2008
Message 6 of 11 (93 Views)

Re: List of Locations related to the Country

Hi,

 

Please a look at the scrennshot 4 posted.The query shoud be as below

 

if (not null(country in $File)) then ($query="name#\""+country in $File+"\"")

 

But in your screenshot it shows

 

if (not (null(country in $File)) then ($query="name#\""+country in $File+"\"")

 

Change it and try again.

 

Regards,

Mahesh.

Please use plain text.
Frequent Advisor
Rohitsinha1706
Posts: 77
Registered: ‎02-25-2013
Message 7 of 11 (87 Views)

Re: List of Locations related to the Country

Hi Mahesh,

 

I have done as you said in above mail.

 

Then also I am not able to get the solution.

 

Please suggest me.

 

 

Thanks in Advance

 

Regards,

Rohit

 

 

Please use plain text.
Advisor
AChandler
Posts: 25
Registered: ‎09-17-2010
Message 8 of 11 (74 Views)

Re: List of Locations related to the Country

Just to check, did you only add the fields to the form? Or did you add them to the table as well?

 

You should have two link lines:

 

The first link line should have country in the Source Field Name and country in the Target File Name and code in the Target Field Name. You do not need a query here unless you want to restrict which countries may be used.

 

The second link line should have current.location in the Source Field name and location in the Target File name and location in the Target Field name. The link line query should say $query and the expressions should say:

 

if (not null(country in $File)) then ($query+=(" and country=\""+country in $File+"\""))

Please use plain text.
Frequent Advisor
Rohitsinha1706
Posts: 77
Registered: ‎02-25-2013
Message 9 of 11 (64 Views)

Re: List of Locations related to the Country

 

Hi mahesh,

 

I will work on the same and I will get back to you soon.

 

Thanks and Regards,

Rohit

Please use plain text.
Frequent Advisor
Rohitsinha1706
Posts: 77
Registered: ‎02-25-2013
Message 10 of 11 (49 Views)

Re: List of Locations related to the Country

Hi Mahesh,

 

I have done as you siad in above mail. I have attached the screenshots for your reference,please have it.

Still i am not able to get the solution,please suggest me.

 

 

Thanks and Regards,

Rohit

 

Please use plain text.
Frequent Advisor
Rohitsinha1706
Posts: 77
Registered: ‎02-25-2013
Message 11 of 11 (22 Views)

Re: List of Locations related to the Country

 

 

Hi Experts,

 

Can anybody help on above requirement.

 

Thanks in Advance

 

Regards,

Rohit

 

Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation