@Prompt

I have a button in a form that I want to be able to do a lookup to another database to make the choices. Here is the code:temp := @Prompt([OkCancelListMult]; “NAQs”;

          "Choose a NAQ for this RFQ";

        @If(SvcName = ""; ""; @Text(@DbLookup("" : "No Cache"; "Mercury/Walker" : "ClientServices\\BestPractices.nsf"; "NAQs Only"; SvcName; 3))));

FIELD NAQ := temp;

@True

When I click the button, nothing happens. What am I doing wrong?

Subject: @Prompt

I’m confused. The syntax for @Prompt is:

@Prompt([OKCANCELLISTMULT]; “Select a Name”; “Select one or more names as recipients for this request.”; “Mary Tsen”; “Mary Tsen”:“Bill Chu”: “Michael Bowling”:“Marian Woodward”)

You need a default and list to pick from. Your lookup is in the default but I don’t see a list to choose from. Look at the help for @Prompt and also look at @PickList because I think that might work for you better.

temp := @Prompt([OkCancelListMult]; “NAQs”; “Choose a NAQ for this RFQ”; @If(SvcName = “”; “”; @Text(@DbLookup(“” : “No Cache”; “Mercury/Walker” : “ClientServices\BestPractices.nsf”; “NAQs Only”; SvcName; 3)))); FIELD NAQ := temp;

Subject: failed to provide a list of choices. Read the manual.

Subject: Simplify:

@If(SvcName = “”; @Return(“”); “”);L1 := @DbLookup(“” : “NoCache”; “Mercury/Walker” : “ClientServices\BestPractices.nsf”; “NAQs Only”; SvcName; 3);

@If(@IsError(L1); @Return(“”); “”);

FIELD NAQ := @Prompt([OkCancelListMult]; “NAQs”; “Choose a NAQ for this RFQ”; “”; L1);

Subject: RE: Simplify:

Thank you Bill…worked great!