How to locate xdXDocument:get-Role Errors - InfoPath Dev
in

InfoPath Dev

How to locate xdXDocument:get-Role Errors

Last post 04-06-2016 09:31 AM by Hilary Stoupa. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 04-05-2016 06:06 AM

    How to locate xdXDocument:get-Role Errors

    In converting a 2010 Filler form to Web, I receive "Function for retrieving the user's current role is not supported" errors. Clicking some took me straight to the control which I fixed. I still have 236 others I cannot locate. Clicking the error only tells me "The function to retrieve the current user's role (xdXDocument:get-Role) is not supported in Web browser forms. This function is currently used in a rule. To fix this problem, remove the function from the rule." However, I don't know where else to look and clicking this error gives me no clue as to where this rule is located.
  • 04-05-2016 07:35 AM In reply to

    Re: How to locate xdXDocument:get-Role Errors

    Yikes. I wonder if you save as source files (under the Publish menu) and then open manifest.xsf in a text editor and search for get-Role if that will help. You'll find the rules, which will have a ruleset identifier - then search on that identifier to find the field in question. Actually - I guess the rules could also be in the view files if you have used the user role for conditional formatting on controls....
    Hilary Stoupa

  • 04-06-2016 07:53 AM In reply to

    Re: How to locate xdXDocument:get-Role Errors

    I was looking at a couple of the other files in Notepad...not the manifest.xsf file - you can tell I usually don't do this type of investigation. OK, I can find them, but these rules are rules I inserted into the predecessor to this form's "Submit" button that has since deleted. By predecessor, I mean, this form was created long long ago using another form as a base, modified it, and renamed it. I looked at the "Submit" button of the predecessor form and found these rules, but I cannot delete them in my current form because that button has long since been deleted. I don't know why they show up in the current manifest file.

    Here is an example of one of the "role" rules:
       <xsf:rule caption="REQ - Director Approval" condition="xdXDocument:get-Role() = &quot;Director&quot; and my:Sect_FormAdmin/my:State = &quot;DCS Manager Approved&quot; and my:qESxtp_SrMgr/my:Sect_Validation_SrMgr/my:OB_Approve-Deny_SrMgr = &quot;&quot;" isEnabled="yes">
        <xsf:dialogBoxMessageAction>Director of Enterprise IT Management Solutions Approval

    Select Approved or Denied.</xsf:dialogBoxMessageAction>
        <xsf:exitRuleSet></xsf:exitRuleSet>
       </xsf:rule>

    I deleted all roles in my current form and copied over all occurrences of my "Submit" button (i.e., those that appear on other views).

     Can I delete the roles in the manifest file and save it back...then open the manifest file and save it as a different xsn? Would that be a back door way of getting rid of all of these role-based rules that seem to still be in my form even though I cannot locate a button that used to contain them?

  • 04-06-2016 09:31 AM In reply to

    Re: How to locate xdXDocument:get-Role Errors

    Yup! I just check the rule set ID, and if I can't find it in the manifest, delete the whole rule set. I don't know why we sometimes end up with these orphan rule sets, but just remove them. After you save the manifest, right click and select Design to see if it opens back up in designer, then File > Save As to pack back up as an XSN.
    Hilary Stoupa

Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.