Conditional Formatting on Edit - InfoPath Dev
in

InfoPath Dev

Conditional Formatting on Edit

Last post 03-27-2010 08:34 AM by dasmay. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 03-27-2010 08:34 AM

    • dasmay
    • Not Ranked
    • Joined on 03-27-2010
    • Posts 1

    Conditional Formatting on Edit

    I have an infopath form that was developed in Infopath 2003 and later upgraded to Infopath 2007. This form is saved to a Sharepoint 2007 library when submitted. This form uses the old JScript and calls out to windows shell to get logged user. I put the user id in a hidden text and compare it to values based in the Sharepoint list. If the userid is contained in the values returned from Sharepoint I use conditional formatting to hide an attachment control. This form runs full trust and is digitally signed. The form works great when you fill out a new form and hides attachment control but if you open to read or edit an existing form its doesn't work. Does anyone have any ideas on what to look for ? This is code on page load: function XDocument::OnLoad(eventObj) { //Load the form path: address to the library var wshShell = new ActiveXObject("Wscript.Shell"); var wshEnv = wshShell.Environment("Process"); var username = wshEnv.Item("UserName"); var strEmployee = XDocument.DOM.selectSingleNode("my:myFields/my:loginid"); strEmployee.text = username; } Here's function that fire to determine user security : contains(@ViewAttachments, loginid) Then I say if username=false hide the attachment control. Thanks in advance.
Page 1 of 1 (1 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.