Setting field value in rule not working - InfoPath Dev
in

InfoPath Dev

Setting field value in rule not working

Last post 12-20-2016 09:39 AM by Hilary Stoupa. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 12-20-2016 09:26 AM

    Setting field value in rule not working

    I am using a repeater table which is displaying data from Tasks list in InfoPath 2013 task form. The field being displayed is "Outcome" whose possible values are "Approved" or "Rejected". Instead of these words I want to display "This is approved" or "This is rejected". For that I added a rule where I want to "Set a field's value". I have added this rule on this "Outcome" field and condition is: If "Outcome" = "Approved" then set value of "Outcome" to "This is approved" If "Outcome" = "Rejected" then set value of "Outcome" to "This is rejected" Problem is these rules are not working and "Outcome" field continue to display "Approved" or "Rejected". What am I doing wrong?
  • 12-20-2016 09:39 AM In reply to

    Re: Setting field value in rule not working

     If this is a secondary data source, rules don't run on the initial query (I KNOW, RIGHT????). You can try one of the following:

    1. Instead of changing the value in the data source, add two calculated values to the table you are displaying the data in - One says "This is approved" and the other says "This is rejected". Add conditional formatting to the two calculated values so only the correct one shows.
    2. Add a form load (or a rule somewhere that runs after this data loads) to set a "helper" field in the secondary data source - for example, you could re-purpose ID, and have a rule on it to set the "Outcome" - if your form load rule sets ID to 0, all instances will change, and rules to set Outcome will fire

    Generally, I'd take option 1 and just use calculated values and conditional formatting. :) 

    Hilary Stoupa

Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.