Display text based on Value - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Display text based on Value

Last post 05-15-2018 05:47 PM by DarthBrute. 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 05-15-2018 10:08 AM

    Display text based on Value

    Really new to Infopath. I did do some searching and I found rules as there is no IF statement for xpath. What I am trying to do is move a spreadsheet to SharePoint. One of my cells for calculation has this formula: =IF(C26>=H26,"BAD",IF(C26>=G26,"OK",IF(C26= BAD (Set a fields Value: BAD) NCPQI >= OK (Set a fields Value: OK) NCPQI
  • 05-15-2018 10:27 AM In reply to

    Re: Display text based on Value

    So - are you looking to create a calculated column in a SharePoint list that reflects this formula? Or are you working on an InfoPath form and need help with the logic to set the field? If this is in InfoPath, you'd use rules with conditions to accomplish this. If you attach your form under the Options tab in a reply, with some info on what fields are the same as C26, H26 and so on, I'd be more than happy to help you.
    Hilary Stoupa

  • 05-15-2018 12:30 PM In reply to

    Re: Display text based on Value

    I had everything typed up. But not everything appears when I post it here. I continued my question over at msdn. https://social.msdn.microsoft.com/Forums/office/en-US/d6c608f4-a88d-495c-b095-b8e6c0e5ae3e/display-text-based-on-field-value?forum=sharepointcustomizationlegacy#d6c608f4-a88d-495c-b095-b8e6c0e5ae3e
  • 05-15-2018 12:33 PM In reply to

    Re: Display text based on Value

    If you are using a browser other than IE, or typing things up in some other application and pasting in that may cause the issue. If you attach a copy of your form under the Options tab in a reply, I'd be happy to give you a hand.
    Hilary Stoupa

  • 05-15-2018 12:49 PM In reply to

    Attached. Be aware it does have a connection to my sharepoint and it may ask for credentials. You should be able to cancel on that. The GOOD, BAD, and OK fields are hidden but lay at the bottom of the form.
  • 05-15-2018 12:56 PM In reply to

    Re: Display text based on Value

    Your rules are on the field you wish to set (this is a common mistake, I used to do this all the time!) and they need to be on the fields that will be changing. That is, rules fire when a field changes, so you don't want them on your target. Instead, put the rules on NRD CPQJ.
    Hilary Stoupa

  • 05-15-2018 03:22 PM In reply to

    Re: Display text based on Value

    I see what you are saying. That worked perfectly! I just had to modify the rules a bit too. Also, when a field (NRD CPQI) is for currency only how do I bypass the error when the field returns "Infinity" and has a red dashed border? I tried rules to replace it but that isn't working. That is happening when ACTUAL COST is being divided by 0 in the #QI field.
  • 05-15-2018 03:55 PM In reply to

    Re: Display text based on Value

    Instead of using a default for NRD CPQI, you should put rules on Actual Cost and #QI. The rules will check if #QI is equal to zero - if it is not, set NRD CPQI to Actual Cost / # QI. I would also add rules to both Actual Cost and # QI to clear NRD CPQI. So, on each rule, the first rule would have no conditions and would set NRD CPQI either to blank or zero (whatever makes sense in your form). The second rule would have a condition to check the value of # QI and if it is greater than 0, set NRD CPQI to Actual Cost / # QI. Does that make sense?
    Hilary Stoupa

  • 05-15-2018 04:51 PM In reply to

    Re: Display text based on Value

    I think so but only after I played around for a bit. What ended up working was I removed the formula in default value of ACOST / #QI from the field. Then set #QI to do the math based on its own value. =0 then make NCPQI blank, if #QI is blank then make NCPQI blank. But it works on the preview I'll see if it works on the SharePoint.
  • 05-15-2018 05:47 PM In reply to

    Re: Display text based on Value

    Everything works thank you very much!
Page 1 of 1 (10 items)
Copyright © 2003-2018 Qdabra Software. All rights reserved.
View our Terms of Use.