×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Create list of dates for Date/Time field

Create list of dates for Date/Time field

Create list of dates for Date/Time field

(OP)
I'm a Notes design newbie - I'm developing a quoting system for our company and the quote document passes through various "status" as it is processed. As it passes into each status the status date is recorded in a Date/Time field for each status.

Occasionally there may be a need for it to pass back through the same status again - instead of the previous status date being overwritten I would like it to be appended to the existing date in that field.

What I was thinking was to save a list of dates in a date time field? So if there was an existing value in the date/time field, the new date would be added to the list? Is this possible? If so how would I program it?

RE: Create list of dates for Date/Time field

I suppose your field is Computed (as well it should be).
Take a look at this code :

@if(!@isdocbeingsaved;fieldname;
@if(fieldname="";newvalue;fieldname:newvalue)
)


As you admit to being a Notes beginner, I'll explain what the code does.

The nature of a Computed field is that its formula recomputes every time the document is refreshed, and when the doc is saved.
Thus, I first check if the document is being saved, since there is no sense to update the formula before then.
If that is not the case, the formula returns the current value of the field - so nothing happens.
If the document is being saved, the code goes to the ELSE portion of the first @If, which is another @if.
This time, I check if the field is empty. If it is, then I just use the value I want to insert.
If it is not, I use the colon sign to concatenate the new value with the data already contained in the field. The colon sign makes the concatenation multi-valued (as opposed to a simple string addition).

There, I hope this helps.

Pascal.

RE: Create list of dates for Date/Time field

(OP)
OK, this is what I have which I thought should work but it doesnt appear to, the field name is ApproveDate:

TodayDate := @Now;

@if(!@isdocbeingsaved;ApproveDate;
@if(ApproveDate="";TodayDate;ApproveDate:TodayDate)
)
;

I get a single date in the field but cant seem to get the concatenated date to show or store - is there anything I need to do to display a list of dates?

The field type is Date/Time is this a problem, should it be something else? Is there anything I need to do to display the list value?

I originally had the "Compute After Validation" property checked for the field and this code in the value:

@If(QuoteStatus!="Approved";ApproveDate;@If(ApproveDate="";@Now;ApproveDate:@Now));

It appeared to do the same thing - ie. only store one date value? Thanks for the help so far...

RE: Create list of dates for Date/Time field

Did you check multivalue in the field properties panel ?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close