Solved

Formula java equivalent

Posted on 2011-02-14
4
1,486 Views
Last Modified: 2013-12-18
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])
0
Comment
Question by:schmad01
  • 2
4 Comments
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 34896370
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
0
 

Author Comment

by:schmad01
ID: 34897264
I am running R8.5.2.
0
 
LVL 31

Accepted Solution

by:
qwaletee earned 500 total points
ID: 34902787
David! Been a long time!

There;s no direct equivalent for running through a series of basic OS prompts on the web. There are some tools you can use to present a series of questions in sequence, such as hiding and showing parts of a single page, that may come close to what you wnat.

Alternatively, why make it so ocmplicated? Just present a straightforward form with all the fields to fill in, and process it when they click a button at the bottom.
0
 

Author Closing Comment

by:schmad01
ID: 34903059
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.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

943 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now