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
6 replies
Subscribers
7 subscribers
Views
3726 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
#SAIL. Is there a way to display three dropdowns (day, month and year) for a!dat
sathishkumars
over 9 years ago
#SAIL. Is there a way to display three dropdowns (day, month and year) for a!dateField() ? a!dateField() displays calendar on SAIL forms and is defaulted to current month and year. But when it is used for Date Of Birth, user have to click many times to get their year of birth and then the month of birth. I know that the user can key in the DOB in dd/mm/yyyy format but some users are not aware and therefore end up clicking many times !!!
OriginalPostID-168620
OriginalPostID-168620
Discussion posts and replies are publicly visible
0
patrickh
over 9 years ago
I am not aware of any way to do this using the a!dateField() component itself. However, you could configure multiple dropdowns where the user selects their birth month, day, and year as text; you can then convert this to a date using the todate() function on form submit or whenever it is appropriate. todate() accepts input in a "mm/dd/yyyy" format similar to manually entering a date in an a!dateField() component.
forum.appian.com/.../Conversion_Functions.html
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
robbier
over 9 years ago
You could use separate drop downs for each of day/month/year and then simply save those selected values into a date variable using the todate() function.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
patrickh
over 9 years ago
Also, as an alternative to what was suggested above, you could simply provide instruction text in the a!dateField() component telling the user that they should input their DOB in a "mm/dd/yyyy" format.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Nick Vigilante
Appian Employee
over 9 years ago
A workaround that you could use is you could add an integer/drop down field above the date picker with its own rule input for year (ri!year), then for the a!dateField object, set the value to the following expression:
if(isnull(ri!year),{},if(isnull(ri!date), date(ri!year, month(today()), day(today())), ri!date))
This will leave the date field null if no value is given for the year field and won't produce an error in your interface, but once a value in the integer/drop down field is given, end users will be taken directly to the month of today's date in that year so they won't have to click too much for a date.
Also, it might not be a bad idea to add instructions to the date picker so end users know they can manually type in a date.
Where exactly do you want to see the drop down? Inside of the date picker or above the date picker in another field?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sathishkumars
over 9 years ago
Thank you patrick, nick and robbie for your suggestions. I guess, I can propose the idea of having instructions. By the way, you had proposed that we can display three separate text dropdowns to capture day, month and year and then convert to date but displaying the three dropdowns one below the other is not ideal (ideal would be to display them next to each other which SAIL does not allow) !!!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sathishkumars
over 9 years ago
Hi Nick, thanks for the suggestions. I can run through it to client and check if they are ok with it.
Requirement is to have three dropdowns next to each other, so if there is a way to show the dropdowns inside date picker, it is well and good else we may have to get rid of date picker and just display three dropdowns one below the other !!!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel