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.
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.
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+"\""))