Solved

Display list of countries under correct group

Posted on 2004-08-12
2
206 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 30 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

685 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