Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi folks,
Wonder if anyone has any ideas how to do this. I've looked around on here but none of the suggestions seem to have worked.
Can anyone tell me how to set this up so that when the document is first opened, it takes the value from the SQL view and displays it in the calendar object?
I have tried to set this using Settings - Document Properties - Triggers - Document Event Triggers - OnOpen:
I've then set the 'Field' to the =vVariable and the 'Search String' to = SQLColumn
However this is not working when I close and re-open the document. I'm wondering if I'm doing this wrong and shouldn't be setting the variable value (as this is set by whatever value the user selects in the calendar object).
Thanks in advance.
You can put it in the load script. Something like
MyView:
SQL SELECT MyDate FROM MyView;
LET vVariable = Peek ('MyDate', 0, 'MyView');
This will assign the variable everytime you reload the document.
//Johan
Thanks so much Johan,
Do you know if there is anyway to get this to happen when you open up the document, as opposed to only when the reload script is run?
Many thanks though anyway. This has worked when reloading script, but would be great if I can get it to work when user re-opens doc as well.
Did you get the syntax right?
See attached. Works in my local installaion.
Hi Johan,
I think I have a similar problem and hoping you can help.
Refer here:
Re: Replace input box with calendar object (on reload script)
Ultimately I want a date picker associated with my SQL parameters so that on reload the date picker pops up and the user, instead of typing into a free text field input box, rather selects a date from a calendar. Any ideas?
Hi,
Have you tried the "Slider/Calender" object? This you can link to either a variable or a field (and set a min / max). Below an example linked to a variable, but as you see, you can link it to a field also.
Johan