Link to home
Start Free TrialLog in
Avatar of David Schmalzer
David SchmalzerFlag for United States of America

asked on

Formula java equivalent

Can someone tell me what the java equivalent would be for this button? It does not work on the web. Here is the button code.

"";
person := @Prompt([OkCancelList]; "Name of person or service"; "Select person or service who conducted transaction."; ""; "Person Name 1":"Person Name 2":"Automatic Recurring");
FIELD name := person;

date := @Prompt([OkCancelEdit];"Transaction date";"Type in the transaction date.";"":"");
FIELD entrydate := date;

type := @Prompt([OkCancelList]; "Transaction type"; "Select the transaction."; ""; "Deposit":"Withdrawal");
FIELD transtype := type;

damount := @If(type="Deposit";@Prompt([OkCancelEdit]; "Transaction Amount"; "Type in the transaction amount including decimals if there are cents."; "");0);
FIELD damount := damount;

wamount := @If(type="Withdrawal";@Prompt([OkCancelEdit]; "Transaction Amount"; "Type in the transaction amount including decimals if there are cents."; "");0);
FIELD wamount := @TextToNumber(wamount);
FIELD wamount := 0-wamount;

awardedto := @Prompt([OkCancelList]; "Awarded To"; "Select the entity the money is awarded to."; ""; "David P Schmalzer":"Glenn D Hodges":"Raven Technologies");
FIELD awardedto := awardedto;

descrip := @Prompt([OkCancelEdit]; "Transaction reason/ description"; "Type in the reason or description for the transaction."; "");
FIELD descrip:= descrip;

FIELD hideall := "hideall";

@PostedCommand([FileSave]);
@Prompt([Ok];"Success";"Your document has been created and saved. The document will now close.");

@Command([ViewRefreshFields]);

@Command([FileCloseWindow])
Avatar of Sjef Bosman
Sjef Bosman
Flag of France image

Is this for R7? R8.5.2? Or somewhere in between?

If it were for Notes, I'd suggest you use a dialog box. In R8.5.2 + XPages, you'd better use a Dojo Dialog. I think the exact equivalent of all your code in Java (?? or do you mean JavaScript?) won't be very useful in any version.

Here some client-side JS-tools: http://www.w3schools.com/JS/js_popup.asp
Avatar of David Schmalzer

ASKER

I am running R8.5.2.
ASKER CERTIFIED SOLUTION
Avatar of qwaletee
qwaletee

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hey qwaletee, yes it has. Wasn't sure I'd ever be using Lotus Notes again, but here I am. Skipped from version 6 to 8.5. Wow, lot's of changes! Thanks. Talk to you soon.