in rule, set value if not blank, not working? - InfoPath Dev Sign in | Join | Help in Newbie Questions InfoPath (Entire Site) InfoPath Dev InfoPath Dev is dedicated to bringing you the information and tools you need to be successful in your Microsoft Office InfoPath development projects. Home Blogs Forums Photos Downloads InfoPath Dev » InfoPath » Newbie Questions » in rule, set value if not blank, not working? in rule, set value if not blank, not working? Last post 03-27-2009 05:36 AM by Jimmy. 4 replies. Page 1 of 1 (5 items) Sort Posts: Oldest to newest Newest to oldest Previous Next 03-26-2009 06:07 AM CraigW Joined on 04-01-2008 Posts 69 in rule, set value if not blank, not working? Reply Contact Hi, InfoPath 2007 client form. I want to store the username of the user who first created the form. I have a field called Originator, with no default value, and the following rule: If Originator is blank Set field value . = userName() But the field is always blank when I preview it! Any ideas why this doesn't work and/or how I can acheive what I want? Thanks. 03-26-2009 06:30 AM In reply to Anuma Joined on 07-20-2005 India Posts 525 Re: in rule, set value if not blank, not working? Template1.xsn Mark as Not AnswerMark as Answer... Reply Contact Hi, I think you have added Rule to that field. But you need to add open rule to that form. go to below path and add rule. Tools-->Formsoptions-->Open and save tab -->Rules For more idea verify attached xsn. Anuma Chinthapalli /http://www.GGKTech.com 03-27-2009 01:21 AM In reply to Jimmy Joined on 07-03-2008 Posts 2,595 Re: in rule, set value if not blank, not working? Mark as Not AnswerMark as Answer... Reply Contact Or you could specify userName() as the default value for the field. Fields' rules only execute when the value changes. Jimmy Rishe / Software Developer / Microsoft MVPQdabra Software 03-27-2009 02:33 AM In reply to CraigW Joined on 04-01-2008 Posts 69 Re: in rule, set value if not blank, not working? Mark as Not AnswerMark as Answer... Reply Contact Wouldn't the value then be overwritten if someone else opened the form? 03-27-2009 05:36 AM In reply to Jimmy Joined on 07-03-2008 Posts 2,595 Re: in rule, set value if not blank, not working? Mark as Not AnswerMark as Answer... Reply Contact No, the default value only has an effect when the field is created (e.g. in a new form or when the field is part of a new row in a repeating section). If you uncheck "Update this value when the result of the formula is recalculated," it should be fine. Jimmy Rishe / Software Developer / Microsoft MVPQdabra Software Page 1 of 1 (5 items) Copyright © 2003-2019 Qdabra Software. All rights reserved.View our Terms of Use.
Hi,
InfoPath 2007 client form. I want to store the username of the user who first created the form. I have a field called Originator, with no default value, and the following rule:
If Originator is blank Set field value . = userName()
But the field is always blank when I preview it! Any ideas why this doesn't work and/or how I can acheive what I want?
Thanks.
I think you have added Rule to that field.
But you need to add open rule to that form.
go to below path and add rule.
Tools-->Formsoptions-->Open and save tab -->Rules
For more idea verify attached xsn.
Or you could specify userName() as the default value for the field.
Fields' rules only execute when the value changes.
Wouldn't the value then be overwritten if someone else opened the form?
No, the default value only has an effect when the field is created (e.g. in a new form or when the field is part of a new row in a repeating section).
If you uncheck "Update this value when the result of the formula is recalculated," it should be fine.