Hi,I am trying to use a magical @prompt so that for offline users, a dialogue box appears where they can enter an email address.
This is because; for online users this field will be computed by looking up to the Corporate Name & Address Book.
I am trying to evaluate this by working out if there’s an error in the field (this is a COMPUTED field btw). If theres an error, then the user should get the dialogue box once enter the details, which should set the field.
BUT - what is happening at the moment is, it all seems to work fine, until you enter something in the next field. Then the prompt re-appears - and asks you to input the same info again…I just want it there once…
Any ideas???
Heres the code:-
-
SalesRep field. This is just a editable dialoguebox containing a keyword lookup to a list of names in the database;
-
Computed field called SPemail
Heres the code:-
ukpin := @Right(@DbLookup(“”:“”;“85255F7E:006405B0”;“($Users)”;@Name([CN];SalesRep);7);8);
InternetEmailAddresscomp := @DbLookup(“”:“”;“86256395:004EDFB0”;“(PeopleByPin)”;ukpin;“InternetAddress”);
@If(@IsError(InternetEmailAddresscomp) & SalesRep!=“”);
Result:=@Prompt([OkCancelEdit];“Please enter the Sales Persons internet email address.”; “For example this address should end @companyname.com”;"@companyname.com");
@If(SalesRep=“”;“”;
@If(@IsError(InternetEmailAddresscomp) & SalesRep=“”); Result;InternetEmailAddresscomp)))