Solved

Q_21884363.html - furhter clarification

Posted on 2006-06-14
12
250 Views
Last Modified: 2013-12-18
Hi all,

End of question in link above, there is a selection view formula.

It works fine in the sense that it grabs the first value in DueDate(listoftestfield) on my form.

For example,

listoftestdate(my form field) has multi dates and time in it
When I compare this using the last selection formula listed in the above link, then create a column for with @explode(listoftestdate) and flag the column to show multiple values as separate entries, then I get only the first entry in the (listoftestdate) displayed in view.
In that array(field) there is other dates which will match the selection criteria(between 1 and 30 days) but I am not able with this date comparison to display them as entries in the view.

I hope that I didn't confuse everyone with this, but I think that I need some sort modification to how I am comparing the @today to duedate(listofdate) field on my form.

I do know that @today is date value, but i also know that listofdate field is date range (date time) value

Ur help is much appreciated.

0
Comment
Question by:varvoura
  • 4
  • 3
  • 3
  • +2
12 Comments
 
LVL 22

Assisted Solution

by:mbonaci
mbonaci earned 100 total points
ID: 16900988
Hi varvoura,
Try using @Keywords formula to figure out which dates in list1 are in list2...


I don't have much time today, so this is my last post for today.
Marko
0
 
LVL 13

Expert Comment

by:CRAK
ID: 16901208
Only as a response to Marko's suggestion (haven't read the preceding question):

@Keywords has one big disadvantage: there are a no. of characters that can not be used in either of the lists, or it will fail. ":" Is one of those characters, which could be in the lists as part of a time component!

An alternative is easy:

InList1NotInList2 := @Trim(@Replace(List1; List2; ""));
InBothLists := @Trim(@Replace(List1; InList1NotInList2; ""));

You may need apply some conversions as @Text and @TextToTime as well...
0
 

Author Comment

by:varvoura
ID: 16901326
OK, there's a bit of misunderstanding here.

I don't need to replace any values, I just want to view selection formula as follows:

Select form = Product & date1 > @today and date1 < @adjust(@today;0;0;30;0;0)
Where date1 is a multivalue date field.
I am not sure why the view is not selecting all the values in the product document which match the criteria but it is selecting the first value in the date1 field which happens to match the criteria.
If however, value2 in date1 field is still falls in between the above parameters, then it isn't displaying in the view and I want to.

Is this a bit clearer now?
Is there some sort of date array comparison in formula which can achieve this?


0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 16901455
the way you have it there it will include the doc if any one value is >today and any other or same value is < today+30 which probably isn't  what you are after as the twovalues today+60 and today--30 would trigger it for instance..

Does this multi-value field have a known number of elements which could be split off using @subsEt or @word and te
ted seperately?
0
 
LVL 18

Assisted Solution

by:marilyng
marilyng earned 100 total points
ID: 16901479
also, have little time. but, going with CRAK and Steve,  you know you can create a formula before the selection:

StartDate:= thisdatevalue or formula;
EndDate:= thisdatevalue or formula;

Select  thisStuff where MyDateField >= [startDate] and myDateField <=[EndDate]

Have you tried something like this?
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 16901554
marilyng,

problem isthat won't bring correct results with multivalue date field afai can see.
start:=....;
end:=...;
date1:=@subset(date;1);
date2:=@subset(@subset(date;2);-1);
etc.
select (date1 > start & date1 < end) & (date2 > start & date2 <end) etc.

is only way I can think of at the moment which is a fixed No. of elements hard coded ... maybe could use r6 formula looping constructs here, haven't used them in selection formulas.

Once you are in you'd have to process the column for date to show just the correct elements too... v.messy
0
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.

 
LVL 18

Expert Comment

by:marilyng
ID: 16901712
@Contains(thislottadates, thisstartdate) & @Contains(thislottadates, thisenddate) ??
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 16902012
ok how about this

start:= ....;
end:= ...;
alldateslist:=@explode(start:end;...);
(or is it implode? to explode into each date in range anyway)

then can use @contains for selection formula against this list.

in multi value field showing date can use replace command to just include dates also in above list.

again, sorry but no notes client or real keyboard to fill in all the syntax specifics

Steve
0
 
LVL 13

Assisted Solution

by:CRAK
CRAK earned 150 total points
ID: 16902030
I've set up a test-form to figure out an approach, but it offers unexpected results.
All may depend on what value(s) "date" actually has: a single value, a set of values or a range.

I've created two editable date/time fields: RangeStart and RangeEnd.
Then I added 3 computed date fields, all multi value:
Multi = RangeStart : RangeEnd
Range = @TextToTime("[" + @Text(RangeStart) + "-" + @Text(RangeEnd) + "]")
ExplodedRange = @Explode(Range)

3 computed texts should give me an indication on wether or not a document would be selected:

@If(Multi > @Today; "Future"; "-")
@If(Range > @Today; "Future"; "-")
@If(ExplodedRange > @Today; "Future"; "-")

If I set RangeStart to 12 Jun 2006 and rangeEnd to 17 Jun 2006, with @Today = 14 Jun 2006, here's what I get (after pressing F9):

Multi = 12-06-2006; 17-06-2006 (result: "Future")
Range = 12-06-2006 - 17-06-2006 (result: "-")
ExplodedRange = 12-06-2006; 13-06-2006; 14-06-2006; 15-06-2006; 16-06-2006; 17-06-2006 (surprisingly no restul shows up)

Odd, but clearly the range is playing us parts!
I bet @Min(date) or @Max(date) may help in the evaluation.....
0
 
LVL 13

Expert Comment

by:CRAK
ID: 16902080
Of course I did another test:

Field DtSet (DateTime, Editable), default = [12-6] : [13-6] : [15-6] : [16-6]
Computed texts show
@Min(DtSet) = 12-06-2006
@Max(DtSet) = 16-06-2006
@If(@Min(DtSet) > @Today; "Future"; "-") = "-"
@If(@Max(DtSet) > @Today; "Future"; "-") = "Future"
0
 
LVL 18

Expert Comment

by:marilyng
ID: 16904233
Hey, CRAK can you check: http://www.experts-exchange.com/Applications/Email/Lotus_Notes_Domino/Q_21884173.html  needs your special expertise, thanks.
0
 
LVL 43

Accepted Solution

by:
Steve Knight earned 150 total points
ID: 16906401
OK, this seems to work for me :-)

today:=@Today;
end:=@Adjust(today;0;0;30;0;0;0);
TestDatesList:=@Text(@Explode(@TextToTime("["+@text(today)+" - "+@Text(end)+"]")));
REM "This should select any dates in TestDates that are also in the exploded date range today to today+30";
select (@Text(TestDates;"S0")=TestDatesList);

Then for your multi-value date column to just include the correct dates:

today:=@Today;
end:=@Adjust(today;0;0;30;0;0;0);
TestDatesList:=@Text(@Explode(@TextToTime("["+@text(today)+" - "+@Text(end)+"]")));
@TextToTime(@Keywords(TestDatesList;@Text(TestDates;"S0")));
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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 article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
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.
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.

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

23 Experts available now in Live!

Get 1:1 Help Now