Authorized User Section - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Authorized User Section

Last post 05-01-2020 08:15 AM by Travis_H. 14 replies.
Page 1 of 1 (15 items)
Sort Posts: Previous Next
  • 04-24-2020 01:17 PM

    Authorized User Section

    Hi, To start off, I only have SharePoint OTB (no workflow access) and InfoPath. I have a custom list in SharePoint that uses an InfoPath form. I have my form all built out... but here is my issue. At the bottom of my form, I have an 'Authorized User Section' for only managers to use. In this section, there is only a People Picker for the manager to put their ID and two radio buttons. In addition, I added a single line of text field that has this formula substring-after(AccountId, "\"). This formula pulls the actually UserID from the string so thats I all I see in the field. I do NOT show this field in my form for users to see. But my question is... I'm trying to put a Rule on the radio buttons for user verification. Meaning, I know for a fact I have 3 Managers. When one of those managers put their UID in the People Picker and my UserID text box returns "U68738".. I want to put a validation rule on my radio button to say if the UserID field does not have one of the three managers ID, then make it an Error (Red). I can put one userID in the Rules if statement, but the next 'Or' piece will not work.
  • 04-24-2020 02:05 PM In reply to

    Re: Authorized User Section

    So - on the validation rule, you have UserID is not equal to "U68738", show a validation error? I'd think you'd need AND instead of OR here - UserID is not equal to "U68738" AND UserID is not equal to "U123455" AND UserID is not equal to ... etc - show an error?
    Hilary Stoupa

  • 04-25-2020 04:31 PM In reply to

    Re: Authorized User Section

    Ok.. I will try this. I was thinking like any other if statements, AND means all included. In my case, it will only be one Manager using the people picker field per record.
  • 04-29-2020 08:36 AM In reply to

    Re: Authorized User Section

    This WORKED!! Thanks
  • 04-29-2020 08:40 AM In reply to

    Re: Authorized User Section

    That worked Great... Just one more added piece to the same question. If you could please help. What if I had 8 different managers that I needed to put in, along with a criteria piece (example, if Validation Field = Yes then the managers UserIDs)? Since we only get 5 If statements and I have already used 4, and need to add the other 5 userids.
  • 04-29-2020 09:01 AM In reply to

    Re: Authorized User Section

    So - the thing with and / or in the validation rule is that you are often checking if something "is not" something else. Which means you end up using "and" more often. Like - "this fruit is not an orange AND it is not a pear" when you are holding an apple. For the more than 5 conditions, I use an expression for the last condition. So if you set up condition 5, then change the first dropdown to "the expression" you'll see the actual XPath being evaluated. You can then copy that and use and (or OR, in some cases) to connect to your other conditions in the same expression. Let's say the expression is: . != "UserABC" - you could manually add to that: . != "UserABC" and . != "UserCDE" and . != "UserEFG" and so on. Make sense?
    Hilary Stoupa

  • 04-29-2020 02:52 PM In reply to

    Re: Authorized User Section

    I tried this. No luck. I might need more help with the expressions. Do you have an example on hand that you send to me?
  • 04-29-2020 03:26 PM In reply to

    Re: Authorized User Section

    What is the expression you have in your final condition? In a condition you create using the normal dropdowns, if you change it to "the expression", what is the expression? Paste those in and I should be able to help you.
    Hilary Stoupa

  • 04-30-2020 12:37 PM In reply to

    Sorry it took so long.. Here is what I currently have (attached) I will need to add 4 more numbers like what you see in the file attached.
  • 04-30-2020 12:41 PM In reply to

    Re: Authorized User Section

    In the last condition in your picture, can you change the first dropdown to "the expression"? A text box will display to the right. Can you copy all the text out and paste that in a reply? Thanks!
    Hilary Stoupa

  • 04-30-2020 01:08 PM In reply to

    Re: Authorized User Section

    Aww.. gotcha! Here is what would go in the last expression. manager_acct is not equal to "029211" manager_acct is not equal to "763964" manager_acct is not equal to "018623" manager_acct is not equal to "121252" manager_acct is not equal to "412660"
  • 04-30-2020 01:55 PM In reply to

    Re: Authorized User Section

    You'll need an "and" between those, and manager_acct will need to include the XPath to the field, but if you change the dropdown to the "the expression" you'll get the full XPath. Let's pretend it is something like "my:group/my:manager_acct" the expression would be: my:group/my:manager_acct != "029211" and my:group/my:manager_acct != "763964" and so forth
    Hilary Stoupa

  • 05-01-2020 06:16 AM In reply to

    Hey.. I got the formula in. Attached. Hopefully you can see the formula. After I publish the form to SP... The 1st 3 UserIds still work fine. The UserIds in the Formula we created... those users are still get an Error.
  • 05-01-2020 07:49 AM In reply to

    So - this is still not correct. I must not be explaining well. I'm attaching a form that might help. Feel free to attach your template to a reply. You need to change the first dropdown in the condition builder to "the expression" and then enter the XPath expression. It needs to be correct, including the correct relative path to the field. Right click the attached form in the heading of this post and save the file locally. Right click the saved file and select Design to open in design mode.
    Hilary Stoupa

  • 05-01-2020 08:15 AM In reply to

    Re: Authorized User Section

    Oh.. I missed which drop down you were referring to. This WORKED as well. Thank you so much for your help!
Page 1 of 1 (15 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.