Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
sibrulotte
Creator III
Creator III

Action select field multiple values- YTD

Hi,

so I'd like to do a YTD on this field  [Année-période financière] which is USUALY a single selection. 90% of the time actually.

It has values like 2014-06, for the 6th period of 2014.

I'm trying to do a button that selects from the : GetFieldSelections ([Année-période financière]) all the way down to the fisrt period of the same year.I've seen alot of threads discussion values that can be seperated by Pipe delimiters, but not alot on arrays.

Does anyone care to help?

Thank you


1 Solution

Accepted Solutions
Nicole-Smith

How about the attached (some details inside).

View solution in original post

8 Replies
sibrulotte
Creator III
Creator III
Author

I think I am on to something with the CONCAT function:

 

='('&CONCAT({<[Année-période financière]={"$(< GetFieldSelections([Année-période financière]))"}>} DISTINCT [Année-période financière],'|')')'

but my set analysis is all crooked, and I need to put a lower limit in there...

Nicole-Smith

I'm not absolutely sure of what you're asking for.  Can you please given an example like "If ___ date is selected, then I expect the button to select dates from ____ to ____"?  There is an easier way to do this than using concat(), I just need to understand what you're trying to do.

sibrulotte
Creator III
Creator III
Author

Sorry,

I had Year To date in mind, and did not explicit the YTD accronym.

If I have 2014-06 selected, I would like the button to select 2014-06, 2014-05, 2014-04, 2014-03, 2014-02 and 2014-01.

If I have 2014-12 selected, I would like the button to select 2014-12, 2014-11... down to 2014-01

Nicole-Smith

If you're 2014-06 field is a date field, you could do it using the search string:

='>='&yearstart(min(DateField))&'<='&max(monthend(DateField))

See the attached for an example.

sibrulotte
Creator III
Creator III
Author

Yes Rob Wunderlich had a great example in his cookbook on setting a Yesterday, lastweek, last month, etc

But my field is not a date. It's the caracters '2014-06'

Nicole-Smith

How about the attached (some details inside).

sibrulotte
Creator III
Creator III
Author

That works great!!!
You get a green star.

Thank you.

Nicole-Smith

Glad it works for you