Solved

Formula java equivalent

Posted on 2011-02-14
4
1,484 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

706 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

19 Experts available now in Live!

Get 1:1 Help Now