Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am wanting to create a text box that pops up only when a certain Year field is selected. For instance, when any date in 2017 is selected I want the text box to pop-up "Data as of 2016". When any date in 2016 is selected I want the text box to pop-up saying "Data as of 2015", etc. Is there a way to do this in the Show Conditional area in the Layout tab?
Thanks.
Ah, ok, we need to put parentheses around the year calculation:
=If(Only(Year), 'Data as of ' & (Only(Year)-1) )
Maybe create a show conditional in your text box like
=GetSelectedCount( DateField) >0
And as expression for the text box itself:
=If(Only(Year(DateField)), 'Data as of ' & Only(Year(DateField))-1)
Thank you for your response.
So in the show conditional I put
=GetSelectedCount(Year) >0 ?
and on the General tab in the 'text' box I put
=If(Only(Year(Year)), 'Data as of ' & Only(Year(Year))-1) or should I remove one of those Years? Either way I get "-" as my result. I'm also not very familiar with the Only function...
You don't need to apply Year() function to a year field, this is only useful to calculate year number from a date number field.
=If(Only(Year), 'Data as of ' & Only(Year)-1)
In which field do you make your selections in? And how do your field values look like?
I have a list box for the 'Month' field and a separate list box for the 'Year' field.
If you make a single Year selection, does the text box work as expected?
It does not. I am getting a - in the box
Ah, ok, we need to put parentheses around the year calculation:
=If(Only(Year), 'Data as of ' & (Only(Year)-1) )
Awesome, that worked. Thank you!