Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Display list of countries under correct group

Posted on 2004-08-12
2
Medium Priority
?
213 Views
Last Modified: 2013-12-18
I have a view called Company which contains

GROUP             Company
--------             -----------
HP                   Singapore, Malaysia, Thailand, Italy
MOTOROLA      Penang, Kuala Lumpur, Ipoh
Philips              Cambodia, Taiwan

When user go to another view and click to enter a new document,
Under one section :

Customer     Group  field A(editable dialog list which get the values from view Company
                                        column 1)
                   Region field B(editable dialog list to display values based on field A to let    
                                        user select which coompany to display)
                              button field C (display all companies depend on value in field A)

e.g when user select HP in field A, it should display all the companies which are Singapore, Malaysia, Thailand, Italy in field B.
when user select Philips in field A, it should display all the companies in field B.

How to I code my field B to work as the example above and the button field C to display all the companies depend on the value which user select in field A?

0
Comment
Question by:kopibean
2 Comments
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 11781484
Set the first dialog field to
    Refresh form when field is changed
and all other dialog fields to
    Refresh form when field is changed
    Refresh options when form is refreshed
0
 
LVL 31

Accepted Solution

by:
qwaletee earned 120 total points
ID: 11785419
Do what Sjef says... in case you were also asking how to set up teh fields so they have those choices in the first place, here's how:

I will assume the first field is named GROUP and the second field is named REGION
Fields should both be Dialog List fields
Go to properties for GROUP
Go to second tab
The drop down in the "Choices" section should say "use formula for choices"
Formula should be @DBColumn(""; ""; "Company"; 1)
Go to the second tab of properties for REGION
Drop down should also say Use formula for choices
Formula should be:
queryResult := @If(!@Trim(Group)=""; @DbLookup(""; ""; "Company"; GROUP; 2); "");
@If(@IsError(queryResult); "Error - " + @Text(queryResult); queryResult)

Make sure that the Company view sorts on the group field, that the first column has group, and the second column has region.

0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses
Course of the Month10 days, 15 hours left to enroll

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question