@Explode function

Hi,
I have 2 sets of Date fields(datFrom, datTo, datFrom1, datTo1) in a form. My user can enter any dates into the 1st set of fields, or 2nd set of fields, or both.
For example:
they can enter "28/10/99" in datFrom field, and "30/10/99" in datTo field, then they also enter again "02/11/99" in datFrom1 field, and "04/11/99" in datTo1 field.

So I have a view to show all the dates that my user entered. However, in my view I have only 1 date From column and 1 date To column. How am I showing 2 sets of date fields in the same date From & date To columns?

I have the following formula in the date From column:
DateList := @Explode(@Text(datFrom) + "-" + @Text(datTo): @Text(datFrom1) + "-" + @Text(datTo1));
@TextToTime(@Text(DateList) + " 08:30 A.M.")

And currently I put the following formula in the date To column, which I think it may caused the inaccuracy:
@If(@Text(datTo1) = ""; datTo; datTo1)

However, the view doesn't show the dates correctly.
Could someone help me? It's quite urgent..... pls help.....
kspueaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

HemanthaKumarCommented:
Hi

I assume that you need to show two datelist values matched up by Columns,,, If that is so then

Use datFrom:datFrom1 in DateFrom Column, datTo:datTo1 in DateTo Column. Don't set any sort options for this columns, but use newline as Multi value seperator. And set Lines per row to 2 and Check shrink rows to content...


Good Luck
~Hemanth
0
kspueaAuthor Commented:
Sorry, forgot to mention.
My view is a calendar view. That's why I need to use @Explode so that every date of the date lists will be shown in the view.
0
sk5tCommented:
I don't understand the need for @Explode here... basically, the two expressions below return the same thing, for two text values 'value1' and 'value2' --

@Explode(value1 + "~" + value2; "~");

or

value1 : value2

Having not done a calendar view, I suspect these would work (I hope):

column 1
--------
@Trim(@Text(datFrom) : @Trim(@Text(datFrom1)));

column 2
--------
@If(datFrom != NULL; @Text(datTo); NULL) : @If(datFrom1 != NULL; @Text(datTo1); NULL)

This should keep things lined up nicely.  @Trim removes empty values from the list.  And the second column follows suit of the first for empties.
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

sk5tCommented:
Whoops -- get rid of the second @Trim for column 1, above.  The parentheses knew what I meant :-)

Also, add a @Trim(  ) around all of column 2's formula...
0
melbor1Commented:
in my opinion, you should do the calculation on the form, put the list of dates in a multi-valued field and then use that field with the option -"Show multiple values as separate entries."  It has been my experience that this is the best way to work with calendar views.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kspueaAuthor Commented:
I tried a lot of formulae but none of them works. I think melbor1's idea is a better solution.

Anyway, thanks everybody.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.