SetValue not setting the value of another field - InfoPath Dev
in

InfoPath Dev

SetValue not setting the value of another field

Last post 10-17-2011 06:43 AM by Jimmy. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 10-16-2011 06:11 AM

    SetValue not setting the value of another field

    Hi,

    I am trying to set a value of another field in the main DS using the SetValue qRules (v3.3) command. I have attached  a screenshot showing the details of the rule for your reference.

    The command is not populating the field and it remains blank for some reason.

     Can you please advise?

    Thanks,

     Padraic 


  • 10-16-2011 08:35 AM In reply to

    Re: SetValue not setting the value of another field

    Is there any error in qRules' Error field?  Can you attach a screenshot of your data source?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 10-17-2011 06:13 AM In reply to

    Re: SetValue not setting the value of another field

    Jimmy,

     Just resolved this myself. Basically, I frequently use a text editor to work out the formulas and functions to input into the value text box in InfoPath 2010.

    However, sometimes this works and sometimes it does not. But as a tip to others, ensure that you input your functions using the 'fx' builder in the 'Set a Value' dialog box.

    Evenn though the syntax of the formula in the screeenshot above is correct, InfoPath 2010 prefers if you build that function using its tools rather than cutting and pasting from a text editor.

    Many thanks,

     Padraic.

  • 10-17-2011 06:43 AM In reply to

    Re: SetValue not setting the value of another field

    Cool.  And yes, if your rule uses a formula (e.g. the concat() function or anything), you must enter the formula in the formula builder, even if you build it somewhere else.  If you paste it into the dialog you're showing in your screenshot, it will just be treated as a text value and won't work.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.