Link to home
Start Free TrialLog in
Avatar of varvoura
varvoura

asked on

Q_21884363.html - furhter clarification

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.

SOLUTION
Avatar of mbonaci
mbonaci
Flag of Croatia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CRAK
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...
Avatar of varvoura
varvoura

ASKER

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?


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?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
@Contains(thislottadates, thisstartdate) & @Contains(thislottadates, thisenddate) ??
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
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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"
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial