List of Locations related to the Country (447 Views)
Reply
Regular Advisor
Rohitsinha1706
Posts: 107
Registered: ‎02-25-2013
Message 1 of 11 (447 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

 

 

Advisor
Nancy_Raj
Posts: 17
Registered: ‎12-26-2012
Message 2 of 11 (443 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+"\"")

Regular Advisor
Rohitsinha1706
Posts: 107
Registered: ‎02-25-2013
Message 3 of 11 (424 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

 

 

Advisor
AChandler
Posts: 29
Registered: ‎09-17-2010
Message 4 of 11 (415 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.

Regular Advisor
Rohitsinha1706
Posts: 107
Registered: ‎02-25-2013
Message 5 of 11 (405 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

 

 

Valued Contributor
mahesh428
Posts: 283
Registered: ‎07-14-2008
Message 6 of 11 (394 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.

Regular Advisor
Rohitsinha1706
Posts: 107
Registered: ‎02-25-2013
Message 7 of 11 (388 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

 

 

Advisor
AChandler
Posts: 29
Registered: ‎09-17-2010
Message 8 of 11 (375 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+"\""))

Regular Advisor
Rohitsinha1706
Posts: 107
Registered: ‎02-25-2013
Message 9 of 11 (365 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

Regular Advisor
Rohitsinha1706
Posts: 107
Registered: ‎02-25-2013
Message 10 of 11 (350 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

 

Regular Advisor
Rohitsinha1706
Posts: 107
Registered: ‎02-25-2013
Message 11 of 11 (323 Views)

Re: List of Locations related to the Country

 

 

Hi Experts,

 

Can anybody help on above requirement.

 

Thanks in Advance

 

Regards,

Rohit

 

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.