cancel
Showing results for 
Search instead for 
Did you mean: 

How to automatically fill an autofill keyword set using the login credentials but without needing a button press on an eform

Jared_Medved
Champ in-the-making
Champ in-the-making

We have done all the below on our eform to try and automatically fill an autofill keyword set with the login username.

1.  Create the autofill and ensure it works if everything were manual on the form.  Ensure the Keyword Types are all mapped and work outside of any scripting.

2.  Create the script to detect if the Document Handle exists

3.  Modify the script so that if the Document Handle does not exist it populates the OBProperty_CurrentUserName value

4.  Modify the script so that it “clicks” the autofill button for you

If we leave number 4 as a physical button or a tab initiated function, it works great. We are interested in having it execute in the code without needing a button press. Like having the code check that the OBProperty_CurrentUserName value is populated and if it is, initiate a "click" event.
However, in my attempts to do this, I've created JavaScript functions that "click" the button when the page loads.  When the button is clicked, however, it submits the form and that causes the page to reload...which causes the button to be clicked again, and so on...

Is there a way to get the OBBtn_ExpandKSXXX to "run" without having the button type="submit"?

1 REPLY 1

Erin_Montis
Star Collaborator
Star Collaborator

Hi Jared!

Thanks for using the OnBase Community and good to hear from you! I don't know of any other way to setup the "ExpandKS" button. According to the MRG (page 42), it must be setup as a submit type.

If you modified the script to only "click" the button when the primary exists and the secondary value (i.e. First Name) doesn't exist, I think it will solve your issue. This way, the "click" only happens once.

You could also set another hidden field value before the "click" and only fire the autofill if the primary exists and the hidden field value doesn't exist. This would prevent an infinite loop if the autofill fails.

Let me know what you think.

Best,

Erin 

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.