Solved

Changing value of a field

Posted on 2004-08-02
9
207 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
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.

 
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

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

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…
  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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…

914 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