-
Bummer that worked for me when I threw that into an OnLoad event.
This one also works for me...after that I am not sure I know what else will work.
Dim sUserName
sUserName = CreateObject(''Wscript.Shell'').Environment(''Process'').Item(''UserName'')
XDocument.UI.Alert(sUserName)
-
Yes it can, one of my clients wanted everything in VBScript:
Dim wsh
Set wsh = CreateObject(''WScript.Network'')
XDocument.UI.Alert(wsh.UserName)
-
Was waiting for that question :-)
That was one of the reasons why I did not use it because of that prompt but I had the ability to using ASP.NET to get the current user.
I believe you can get rid of it by messing around with IE security options. InfoPath is built on IE security model. I am not an expert on this topic. If you have the InfoPath ...
-
In the link above, I referenced some ways to get the current user name with script, the second one mentions using ActiveX.
''2 - Use ActiveX to get the current user name (discussed on this forum).''
Read this as well -http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=173
-
If field7 in your case was name something like ''readonly'' and is of boolean type I think what you are doing makes sense.
To play devil's advocate, creating a field in a schema for the sole purpose presentation may not be best. If the presentation can be determined from the state of the data in the form some developers would consider it ...
-
Yes, on the OnLoad event you can do a check to see if a value is equal to another value.
Read this tutorial that is posted on this web site -http://www.infopathdev.com/howto/tutorials/default.aspx?i=88f921f13dec4e7cae61191bac084fff
What you are basically doing is writing your own custom functions that can return true/false and then use them in ...
-
Maybe someone else has run into a similar problem.
-
FYI...the reason why you had to do that is because if you put the RULE on the other control there is nothing there is no event fired to execute the RULE. Hope that makes sense. That book will go over everything we talked about plus MSN has some great ...
-
Hey no problem...I live to serve.
I started out with that InfoPath book you put up. It is great and have referred it to my clients that are just starting to use InfoPath.
Sometime you cannot do what I suggested but it is a recommend path to go.
Ummm...where go you have this RULE defined? How about trying to put that RULE on the same control, ...
-
This book is pretty good and gets to the point quickly -http://www.bookpool.com/sm/0321113594
No worries on the long post, I know I have done longer. When you added txtQuery to your InfoPath form, is that field ''bound'' to your main data source or your seconday data source? When I ask secondary data source, go to the InfoPath task pane ...