Hi,
Please if someone could help me , been struggling for this a long time.
I have a button in the middle of the form, the Button when clicked in Notes Clients Appends Comments and also Appends Date and Time and Updated By in a Field called Overall Comments .
Here is the code that works fine in Notes Client …and nothing seems tow ork on web client
@If(@IsDocBeingEdited; “”; @Command([EditDocument]));
FIELD Comments := @If(Comments = “”; “”; Comments + @NewLine) + @Text(@Now) + " by " + @Name([CN]; @V3UserName) + " – ";
Comments;
Thanks in advance,
ac ac
Subject: Code behind the button works in Notes Client , but Doesn’t work over the web—Please help
Um, no, that wouldn’t work in the client either.
Subject: RE: Code behind the button works in Notes Client , but Doesn’t work over the web—Please help
It works , on the client , I just tested it and works beautifully.
But I don’t know how to make it work on the web.
Basically I just want to Append (If Comments Field is not blank) then Add Comments + @newline + Date + " By " + @Name([CN]; @Username) to the Comments Field is a multivalue field separated by a Newline
Thanks in advance
ac ac
Subject: RE: Code behind the button works in Notes Client , but Doesn’t work over the web—Please help
The code that you posted cannot do what you say it does. If the overall comments field is being affected at all, it has nothing to do with the button code. The final line you posted is a fieldname followed by a semicolon. The field name by itself at the end of a button action is meaningless, and the semicolon makes the syntax illegal for the final line. What you posted absolutely cannot be working code. Oh, and you’ll find that there is no “edit mode” on the web – a page is either editable, or read-only – so code that requires a “mode change” before continuing can’t work.
Subject: Code behind the button works in Notes Client , but Doesn’t work over the web—Please help
Geez, Stan, give the guy a break!
Ac, the last line (“Comments;”) is not required, nor does it do anything, since a button has no return value.
The first line is the problem.
@Function based formulas are translated into javascript for web use. The @Command… in your formula cannot be translated, so I guess it is invalidating the entire button. Try with just the middle line “Field Comments…–”;"
I think you will find it will work.
AB
Subject: RE: Code behind the button works in Notes Client , but Doesn’t work over the web—Please help
The guy’s had a break or thirty from me already over the years – the code as posted won’t even save in Designer, let alone work. @Command([EditDocument]) works just fine on the web – by itself. Keep in mind that a “mode change” on the web means serving a new page to the browser, so a “go to edit mode and then do something else” action won’t work.
Subject: Code behind the button works in Notes Client , but Doesn’t work over the web—Please help
@Newline fucntion does not work on web…please try with out that @Newline function…
Subject: RE: Code behind the button works in Notes Client , but Doesn’t work over the web—Please help
@NewLine works just fine on the web – it just doesn’t disply the way you might expect it to, since it will act the same way a new line in an HTML source file would work if you use it anywhere other than in a textarea.