Solved

Q_21884363.html - furhter clarification

Posted on 2006-06-14
12
257 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

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…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

630 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