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
5 replies
Subscribers
7 subscribers
Views
2792 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
Javascript functions - replacement of calworkdays
bojanb
over 8 years ago
Hi,
I have a problem regarding the calculation of a calworkdays function for two dates on a user form. We are not using SAIL at the moment, so until we upgrade, can you please give us a workaround solution by using javascript functions?
I have tried using the following code (for an on-change event of the date input fields):
if (window.FormAPI.getValue("date1").id !=""){
if (window.FormAPI.getValue("number40").id=="")
{
window.FormAPI.setValue('number40',"");
$('input:submit.submitButton')[0].click();
}
else
{
window.FormAPI.setValue('number40',"");
$('input:submit.submitButton')[1].click();
}
}
What this code does is whenever the user changes the values of the date input forms, the javascript function submits a hidden button and reloads the form (as a chained action) and in the output of the form, the calculation of calworkdays is done, so that when the form reloads, that value will be shown in the '...
OriginalPostID-242887
Discussion posts and replies are publicly visible
Parents
0
bojanb
over 8 years ago
The Date field only has change event. I tried using the "input" trigger in the load function (in the code that I previously wrote), but still - nothing happened.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
bojanb
over 8 years ago
The Date field only has change event. I tried using the "input" trigger in the load function (in the code that I previously wrote), but still - nothing happened.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data