Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello I've been using the example of Nick Bor of a Calendar that displays a range of dates.
Aparently, I have the same example. And I've added the triggers in the properties of the document.
Both triggers (minDate and maxDate) are based in Nick's example way like this :
=if(len(GetFieldSelections(Date)), vStartDate)
But in my case I have a date field called "Fecha Registro" and vStartDate is minOrderDate, so the result would be :
=if(len(GetFieldSelections([Fecha registro])), minOrderDate)
It should work but nothing happens when I click into the field. Any Ideas??.
Thank you very much in advance.
John,
This min and max functions will ALWAYS provide SOME data for variables. It means you will see some selections in calendar objects what is not good when you click on CLEAR or CLEAR ALL button.
Marcel,
Take a look at fixed solution in attachment.
You have to check my example for triggers on vStartDate and vEndDate variables.
In your example, you are not selecting Fecha registro. The values in Fecha registro are merely possible, not selected. So getfieldselections([Fecha registro]) won't return anything.
If that was fixed, you would then set variable minOrderDate to variable minOrderDate. In other words, even if you were checking the right condition, you're doing nothing. I suspect you instead want to set it to min([Fecha registro]).
Not sure what condition you're really trying to check. I probably wouldn't even check any condition. So I'd use these expressions:
=min([Fecha registro])
=max([Fecha registro])
Your variables are then set based on the selections. However, I have no clue if that's what you wanted.
John,
This min and max functions will ALWAYS provide SOME data for variables. It means you will see some selections in calendar objects what is not good when you click on CLEAR or CLEAR ALL button.
Marcel,
Take a look at fixed solution in attachment.
Thank you Nick, now it works fine. But I still don't know what have you changed to get it work. Could you tell me what have you changed?
Many thanks Nick.
Thanks Nick and John for your useful help.
Nick, I found what have you changed. It was in the Triggers tab in the properties document option. My problem was that I thought you only change the first option : "document event procedures". Now I see you change the values of the variables as well in the option "variable event procedures".
I'll show you better with a picture :
And the expression you have to add to make it work :
See you around !!!
That's right.