Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
3 replies
Subscribers
6 subscribers
Views
1706 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Process
I am building a process model that contains a start date and an end date picker.
helmuta
over 10 years ago
I am building a process model that contains a start date and an end date picker. I want to ensure that the start date is always a Monday and the end date is always a Sunday. I don't see any functions that allow me to check for this type of behavior. Has anyone run into this situation? If so how did you solve the problem?
Thank you!...
OriginalPostID-117011
OriginalPostID-117011
Discussion posts and replies are publicly visible
0
stephanek
over 10 years ago
i don't know if there is a specific function but a workaround i can suggest:
1- Create a first custom system calendar "startMonday" where you only select all monday as working days and all the rest as Non working days.
2- Create a second custom system calendar "endSunday" where you only select all sunday as working days and all the rest as Non working days
3- For each dates use the related calendar with the Function : caladddays() passing 0 as offset.
i mean for startDate you would use: caladddays(startDate,0,"startMonday")
for endDate you would use: caladddays(endDate,0,"endSunday")
i think this should work and you can modify calendar to include/exclude more Days
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Josh
Certified Lead Developer
over 10 years ago
To validate if the date picked is a monday or not you could use a custom expression rule that checks to see if the appian function weekday(dateSelected)=2 (Monday is the second day of the week).
You can do something similar for sunday (weekday() = 1) but if its going to just be one week you can update the end date to startDate + 6.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
helmuta
over 10 years ago
Thank you both! I will give your suggestions a try.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel