Solved

Changing value of a field

Posted on 2004-08-02
9
206 Views
Last Modified: 2013-12-18
Hi!

I started learning Notes Designer last week, and I didn't see Lotus Script at all!

I only saw Forms, Views, Framesets and stuff like Hide-when, Roles and some basics formulas like @Command( [FileSave] ); or @Name([CN];@UserName);

The only thing I can't find out is simply to change the value of a field on FileSave, for example...

I tried this on an action button, just before the @Command( [FileSave] );  :

FIELD filedName := "a string";

But it doesn't work!
0
Comment
Question by:barbotte
  • 4
  • 3
  • 2
9 Comments
 
LVL 31

Expert Comment

by:qwaletee
ID: 11694351
Hi barbotte,

That should work... in a form, add this as an actio button:
FIELD someFieldThatIsAlreadyOnTheForm := "some value";
@Command([FileSave])

The field should already be a field added to the form design.  Make sure the name is spelled the same.

Cheers!
0
 

Author Comment

by:barbotte
ID: 11694472
Well, the value a the field is computed, maybe that could be the problem??

But I simply cannot put this field as Editable...  Still, I must be able to change the value, so...
0
 
LVL 19

Assisted Solution

by:RanjeetRain
RanjeetRain earned 50 total points
ID: 11694544
Computed fields work differently. The problem is that they DO NOT RETAIN data after having been closed, even if you save it. Because you simply can't save their values. As long as the document is open, you can CHANGE, you can READ the modified value. But all this lasts only as long as the document is open. As soon as you close down and reopen, its value gets reset to what you specified as its DEFAULT VALUE.

That's why a default value is a must for a computed field.
0
 

Author Comment

by:barbotte
ID: 11694621
I've put a defaut value...  But as it's a kind of "status" field (initial, open, assigned...) I don't want the people to change the value, and I want it computed only if some others fields are completed or if data is entered somewhere...

What would be the solution then, if I want a non-editable field which could still change value?
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 31

Accepted Solution

by:
qwaletee earned 50 total points
ID: 11694829
Use computed when composed.  That saves with teh document.  It does not allow user eidts, it is saved with teh document, and the formula is only ocmputed when the value did not previously exist.  So, when you change the value, the formula won't compute again, and it will retain the value you have changed it to.
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 11694848
Make it "Computed when composed".
0
 

Author Comment

by:barbotte
ID: 11694895
Thank you!  it works!

I'll double the points to give you each 50 points, thank you for your time and your fast answers!
0
 

Author Comment

by:barbotte
ID: 11694898
there it is...
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 11694929
The real cool thing is that you know one thing more about Domino developement now :)
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
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.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

760 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

18 Experts available now in Live!

Get 1:1 Help Now