Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a list box displaying dates . I wanted to select dates of last week by default.
Can someone help me how I can do this?
Thanks in advance
I'm on SaaS so I assume by Listbox you mean the filter object. If so, you can create a bookmark with the values selected and set it to be the default bookmark. Whenever the app is opened the values will be already selected then.
Simply select the default values you want (if it's dynamic then you should use a expression in the filter search bar to select) and then create a bookmark by the top right corner, then right click it to set as default.
For further information, please check this link:
you can use sheet level triggers to select default last week dates
>=week(addweeks(today(),-1))
or
>=today()-7
I have tried to set a sheet trigger.
But it is not working.
Could you please let me know what is wrong with this implementation?
Can bookmarks be apllied dynamically. I want to select dates of last week. And it keeps on changing each week.
What I understood from the article (for which you have provided the link) that I have to make a selection in the sheet and then create a bookmark.
But this default selection is not constant. It keeps on changing each week.
Try :
>=date(Today()-7)
instead in the search string.
Regards,
Rohan.
Hi,
Check out the following video, for Dynamic Bookmark creation :
https://www.youtube.com/watch?v=tFyqOigqnUw
Regards,
Rohan.
Suppose the field you're filtering is name myField. Type the following in the search bar of the filter:
=myField<=Today() and myField>=(Today()-7)
This should select every date lower than Today's date and greater than 7 days in the past, which theorically would represent a week. If you want to filter a specific week and not 7 days of the week, you can refer to the date using week(), which will give you the week number of the year, but you'll need a master calendar for that, or an equivalent field already present in your model.
After typing the expression in the filter, simply confirm it to select and then save your bookmark. Now whenever the sheet is opened the same expression will be applied to the filter.
try like below
='>=date(today()-7,'YYYY-MM-DD')'