Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Community,
I' am stuck with an issue. I have created two calendar objects. One of them points to StartDate while the other corresponds to EndDate. Things are working fine... but the client wants current week to be shown in the Calendar objects when they open the application.
Example let us say that today is Monday 08-07-2013 tomorrow will be 9th and so on.. when the end user opens the dashboard he/she should see charts based upon current week and also the main part is that the Calander objects should show the dates corresponding to current week.
If we consider period from 1st July to 5th july, then 'From' calander should show 1st july while the other that is 'To' Calander should show 5th July and these should happen when the dashboard opens
Thanks in advance for your help and suggestions
Create two variables
vStartDate =WeekStart(now())
vEndDate =WeekEnd(now())
Settings > Document Properties > Triggers >
OnOpen Action > Add Action > Add > Action Type "Selection" > Action "Select in Field" > OK >
= '>=$(=vStartDate) <=$(=vEndDate)'
See the attached file.
Use Settings > Document Properties > Triggers > Document Event Triggers > OnOpen
Add a new Action "Select in Field"
Hope that helps,
Florian
Hi Florian,
Many thanks for your help. Actually my requirement is that I have two calendar objects on the dashboard and user want that when the dashboard is opened, by default the current week Start and end date should be displayed on the Calendar.
You can see from the attchement that there are 2 calendars namely From Date and To Date and this is where we want the current week to be diplayed.
Example for this July month, the current week no. is 28 so the calanders should display 8th on the from Date and 9th on the To Date calanders respectively
Please help
Hi Mark,
I tried your suggestion but it's not working for me.. Actually my requirement is that I have two calendar objects on the dashboard and user want that when the dashboard is opened, by default the current week Start and end date should be displayed on the Calendar.
You can see from the attchement that there are 2 calendars namely From Date and To Date and this is where we want the current week to be diplayed.
Example for this July month, the current week no. is 28 so the calanders should display 8th on the from Date and 9th on the To Date calanders respectively
Please help
I'm not sure if I understand your issue, but if you've got two date fields (StartDate and EndDate) you could try the following:
Use Settings > Document Properties > Triggers > Document Event Triggers > OnOpen
Add two Actions ("Select in Field")
1) Field: StartDate, Search string: =WeekStart(Today())
2) Field: EndDate, Search string: =floor(WeekEnd(Today()))-2
Regards,
Florian
Hi Florian,
I have created two variables vStartWeek and vEndWeek for this purpose
Could you upload a short example qvw that outlines your issue? That would simplify things
Hi Florian,
I'am attaching a sample application for your reference. Here there are two calander objects and the requirement is that we need From calendar to display the starting day of the current week while the other Calendar(To Date) should show the end date of current week on opening of the dashboard.
Thanks for your help in advance.
There are at least two things you should change:
I adjusted 1) and 2) and the StartDate works now.
Apart from that: I'm wondering if you really need all triggers/variables ... I guess you could simply target the original field Q_CLOSEDDATEFORMAT for your triggers.
Regards,
Florian