Help with designing form

Hello there,I’m designing my very last notes client application and need a little bit of help designing a form. I know notes can do just about anything so hopefully someone can point me in the right direction.

I have a view called contacts. This view contains contact names, phone numbers and email addresses.

On my orders form I have a “select contact” button. When pressed this button should display the contacts view. I would like the user to select a contact and the corresponding fields on the form should be updated e.g “phone number” and “email address”.

Any ideas,

Thanks guys

Subject: Help with designing form.

What you need:

1: a view with 1 hidden column, containing the needed information, separated by for instance “##”

2: a button with an @picklist-command > collects the info from the hidden column

3: a hidden field on your form that catches the chosen value

4: computed fields on your form that use the value of the hidden field:

@If(hiddenField = “” ; “” ; @Word(hiddenField;“##”;2))

Success

Subject: RE: Help with designing form.

thanks guys,one last question, the value I get in my hidden field looks like this

john##ph:8877888##john@test.com

Is there anyway to grab the email address from this hidden field into a separate field??

Once again a million thanks for your help

Subject: RE: Help with designing form.

I’m not exactly sure what you’re asking, but your hidden field (let’s call it ContactInfo) and you want to put the E-mail into ContactEmail then:

In your button when you do the look-up you could just have the line:

@SetField(“ContactEmail”; @Explode(ContactInfo;“##”)[3]);

or

Field ContactEmail := @Explode(ContactInfo;“##”)[3];

Subject: RE: Help with designing form.

thank you stephen! that worked perfectly.thanks a million!

Subject: RE: Help with designing form.

Here a sample piece of code, in this case I’m selecting a Test # to get information (i put the . . to preserve the tabs incase you’ve viewing via the web)

Everything above the List := @DBLookup is just me trying to have a standard format so I can copy the code to another area and just change the FieldName and Srv and Path Information.

FieldName := “TestMethodNo”;

Srv := MethodSrv;

Path := MethodPath;

OrgVal := @GetField(FieldName);

Key := “Testing”;

ViewName := “luMIbyMethod”;

Values := 2;

PromptTitle := “Select Test Number”;

PromptMsg := “Select from the following:”;

ErrMsg := (Key + " not found on the “):(ViewName + " view.”):(OrgVal);

List := @DbLookup( “”:“NoCache” ; (Srv: Path) ; ViewName ; key; Values );

cList := @If(@IsError(List) ; ErrMsg ; @Unique(@Trim(List)) );

Ans := @Prompt([OkCancelList]:[NoSort]; PromptTitle; PromptMsg; OrgVal; cList);

@If( @IsError(Ans); “”;

. . . . @Do(

. . . . . . . . @SetField(FieldName;Ans);

. . . . . . . . ViewName :=. . “luMIbyMTNo”;

. . . . . . . . Ans := @DbLookup( “”:“NoCache” ; (Srv: Path) ; ViewName ; Key+Ans; 2);

. . . . . . . . . @If(@IsError(Ans);“”; @Do(

. . . . . . . . . . . . list := @Explode(Ans;“~~”);

. . . . . . . . . . . . @SetField(“TestMethodNo”; list[1]);

. . . . . . . . . . . . @SetField(“TestCost”; @If(list[2]=“”; 0; @TextToNumber(list[2]) ));

. . . . . . . . . . . . @SetField(“TestProcType”; list[3]);

. . . . . . . . . . . . @SetField(“NoSample”; @If( list[4]=“”; 0; list[4] ));

. . . . . . . . . . . . @SetField(“TestNonStndDetails”; list[5]);

. . . . . . . . . . . . @SetField(“TestType”; list[6])

. . . . . . . . . . )

. . . . . . . . )

. . )

);