Create read only field using user roles, rules, and javascript - InfoPath Dev
in

InfoPath Dev

Create read only field using user roles, rules, and javascript

Last post 09-20-2012 07:16 AM by Ghoztrider. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 09-18-2012 07:27 AM

    Create read only field using user roles, rules, and javascript

    I need to set a few fields read only. Here is what i'm trying to do.... Create rule: On form load If user role = reader then make that field readonly. Is there a way to do this with or without javascript? Any help is appreciated! Thank you.
  • 09-18-2012 08:35 AM In reply to

    Re: Create read only field using user roles, rules, and javascript

    How are you determining the user's role? Do you have a way of querying active directory, are you querying a SharePoint list that contains a list of users and roles?

    I think that's the tricky part. The rest is easy, since InfoPath provides a way to add Formatting logic, so you can disable a field if a certain condition is satisfied.

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 09-18-2012 08:40 AM In reply to

    Re: Create read only field using user roles, rules, and javascript

    From my limited knowledge, I'm going to say active directory. Thanks.
  • 09-19-2012 06:21 AM In reply to

    Re: Create read only field using user roles, rules, and javascript

    Ok, great. This means that if you create a data connection to retrieve data via Active Directory, you'll have all of the user's active directory properties available in the secondary data source. Within that set of data, are you getting a user role, department or something similar?
    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 09-20-2012 07:16 AM In reply to

    Re: Create read only field using user roles, rules, and javascript

    Yes, I've created the secondary connection and I can now get data from active directory. I just figured out I can use conditional formatting to make a field read only...sweet! Thanks for the push in the right direction ErnestoM!
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.