This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Why is it not possible to navigate to all required fields?

When a field is required we would like the option to navigate to that field from the error message. I do believe this has worked for all fields before but now it is only some.

In images you can see same form but fields required from table and workflow is not possible to navigate to and the field set to required/invalid from script is.

Also they don't come at the same time, but that is another issue.

  • 0

    This looks like a custom form.  Is the "Category" field on the form?  Is the field or the section in which the field is located hidden or shown by form actions or JS?

    What privilege section is the "Category" in?  Does the user have access to that section?

    If you have a "Superuser" or Administrator account, make sure that account has all Roles and privileges for the application then try doing this as that user.

  • 0 in reply to 

    Sorry, I wasn't clear in the original question. The Category field works fine.

    It is the second screen shot that really is my problem. The Subject (witch is a renamed Title field) and the WVTA EC field are required fields but does not have the navigation option. As you see in the screen shot it is not blue, no link. 

    The thing that I have noticed before is that the name needs to be the same as the Display name of the field, if you make the message in a script. It is of course for these fields since they are required from the system.

    AND the Subject and WVTA EC fields are required from the workflow. 


    The difference that I can see is that Category has double quotes and the "system required" fields single quotes in the error message. 

  • 0 in reply to 

    Interesting point about the quotes.  Does the JavaScript console or the server's Application Event log yield any information??

    And how about field privilege sections?  Does the user have the privilege to view the non-displayed field?

  • 0   in reply to 

    It could also be because of the type of field. I would guess that "Category" is a selection field, which Submit and WVTA might be text fields. Either way, this might just be a defect, so you would need to submit a case with support to file the defect. Another option you could consider  is to try modern forms instead. Modern forms are different from Legacy forms and do have some extra features. 

    You can set if your form is a Legacy form or a Modern form my looking in Composer:

    Modern forms do use pure html5 to render the forms, so if you decide to try this, be sure to check your form carefully. It might render slightly differently.

    With modern forms, there is a drop down in the top right to help with navigating to required fields. You can either click each field to navigate to them, or use the "Next" button to jump to each required field. Or, there is also an option to hide all fields on the form except the required fields.

  • 0   in reply to 

    I do not know a workaround to your issue as the problem is that error message is coming from the server. This differs from first error message that you receive, which has the hyperlink, because it happens on the form before the submit process. That is why you see the messages at different times. 

    After the form does its verification, then SBM contacts the server and the server responds if there is any required field that isn't filled or if there is an incorrect value (maybe a deleted user). The server writes out the message without the hyperlink. In my apps, the error usually results if a transition from a decision node has a field that wasn't required in the original transition heading into the decision node.

    Workaround would be to ensure that the field is required at the beginning and that it is on the form. You can verify that the field is required by looking at Vickie's second screenshot where it lists the required fields on the form in the upper right hand corner.

  • 0 in reply to 

    Yes, I noticed the part about the quotes a long time ago when making the messages from Appscript with the enhancedValidation javascript therefor I was "looking for it".

    Nothing in either the Javascript console or the Eventlog. There is no problem with the fields as per filling in or them being required so privileges and display on form is fine, it is just annoying that some are able to click and some not.

  • 0 in reply to   

    No, sorry it's not the type of field. I'm pretty sure that  has a point in the post that it's from where the message is coming. If I put the Subject (TITLE) in the javascript with Category as required that too get the navigation link. But it would be sad to have to rewrite all required fields in javascript instead of using the out of box function of a required field in workflow!

    The form is still in Legacy mode, we have a lot going on on the forms and not really ready to switch yet.

  • Verified Answer

    +1   in reply to 

    Since you are in legacy mode and you have the links, there is a good chance that you started from an SBM built application or have the Solutions Extension which includes the file enhancedValidation.js.

    There is a function in there that adds the link to the message.

    Quickly looking at the code, it seems that the problem is the visibility check. I'm not sure of your JavaScripting skills, but you can try adding the following function to your page to see if it helps.

    This would be a second function, equivalent to the first, but it also runs the replacing links if the error code contains an error message with the default error message and it isn't shown:

    function AddLinksToErrorMsg2() {
        var errMsgJq = jQuerySBM("#ErrorMsg");
        
        if(errMsgJq.size() > 0 && !errMsgJq.is(":visible") && (errMsgJq.html().indexOf(defaultErrorString) > -1 ) ) {
            var errorHtml = errMsgJq.html();
            newErrorHtml = errorHtml.replace(/\'(.+?)\'/g, "'<a href=\"javascript:NavigateToField('$1');\">$1</a>'");
            errMsgJq.html(newErrorHtml);
        }
    }
    AddLoadCallback(AddLinksToErrorMsg2);

  • 0 in reply to   

    Brilliant, that was spot on! I added this code in the "old" EnhancedValidation and it works. That's what I thought but couldn't do mysef. Thanks!

  • 0   in reply to 

    Nice! I'm glad that worked.