<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic In Modify Module use nested if to update a field in DemandTools</title>
    <link>https://mycommunity.validity.com/t5/demandtools/in-modify-module-use-nested-if-to-update-a-field/m-p/1914#M1054</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;Am building a nested If statement to update a field based on the values of two fields:&lt;/P&gt;&lt;P&gt;IF(OR($(FIELD_A)="VALUE A" &amp;amp; $(FIELD_B)&amp;lt;&amp;gt;"VALUE X'",$(FIELD_B)="NEW VALUE",&lt;/P&gt;&lt;P&gt;IF(OR($FIELD_A)='VALUE B" &amp;amp; $(FIELD_B)&amp;lt;&amp;gt;"VALUE Z", $(FIELD_B)="NEW_VALUE_1", ETC))&lt;/P&gt;&lt;P&gt;So, for example, if Field A = 'Apple' and Field B &amp;lt;&amp;gt;'Red', update Field B = 'Red', if field A = 'Orange' and Field B &amp;lt;&amp;gt; 'Orange', updated Field B = 'Orange'&lt;/P&gt;&lt;P&gt;I used the solution posted by anthonyvalidity on 7/6/23 as a starting point but my results are all 'true' or 'false' instead of the updated value that i want.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Pam&lt;/P&gt;</description>
    <pubDate>Fri, 05 Apr 2024 13:31:42 GMT</pubDate>
    <dc:creator>pgiovane</dc:creator>
    <dc:date>2024-04-05T13:31:42Z</dc:date>
    <item>
      <title>In Modify Module use nested if to update a field</title>
      <link>https://mycommunity.validity.com/t5/demandtools/in-modify-module-use-nested-if-to-update-a-field/m-p/1914#M1054</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;Am building a nested If statement to update a field based on the values of two fields:&lt;/P&gt;&lt;P&gt;IF(OR($(FIELD_A)="VALUE A" &amp;amp; $(FIELD_B)&amp;lt;&amp;gt;"VALUE X'",$(FIELD_B)="NEW VALUE",&lt;/P&gt;&lt;P&gt;IF(OR($FIELD_A)='VALUE B" &amp;amp; $(FIELD_B)&amp;lt;&amp;gt;"VALUE Z", $(FIELD_B)="NEW_VALUE_1", ETC))&lt;/P&gt;&lt;P&gt;So, for example, if Field A = 'Apple' and Field B &amp;lt;&amp;gt;'Red', update Field B = 'Red', if field A = 'Orange' and Field B &amp;lt;&amp;gt; 'Orange', updated Field B = 'Orange'&lt;/P&gt;&lt;P&gt;I used the solution posted by anthonyvalidity on 7/6/23 as a starting point but my results are all 'true' or 'false' instead of the updated value that i want.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Pam&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2024 13:31:42 GMT</pubDate>
      <guid>https://mycommunity.validity.com/t5/demandtools/in-modify-module-use-nested-if-to-update-a-field/m-p/1914#M1054</guid>
      <dc:creator>pgiovane</dc:creator>
      <dc:date>2024-04-05T13:31:42Z</dc:date>
    </item>
    <item>
      <title>Re: In Modify Module use nested if to update a field</title>
      <link>https://mycommunity.validity.com/t5/demandtools/in-modify-module-use-nested-if-to-update-a-field/m-p/1916#M1055</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://mycommunity.validity.com/t5/user/viewprofilepage/user-id/153"&gt;@pgiovane&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;
&lt;P&gt;There's a couple things that I'm seeing as problematic with the formula you provided.&amp;nbsp; It sounds like you're wanting to use an AND formula in both IF formulas.&amp;nbsp; The second IF formula will be used if the first IF statement is not true.&amp;nbsp; This is what I imagine the formula would look like:&lt;/P&gt;
&lt;P&gt;IF(AND($(FIELD_A)="VALUE A",$(FIELD_B)&amp;lt;&amp;gt;"VALUE X"),"NEW VALUE", IF(AND(($FIELD_A)="VALUE B",$(FIELD_B)&amp;lt;&amp;gt;"VALUE Z"),"NEW_VALUE_1",$(FIELD_B)))&lt;/P&gt;
&lt;P&gt;Note that you don't tell the formula where you want the true value to be - that is done when you select the field you want to change on the left side.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AnthonyValidity_0-1712325422584.png" style="width: 400px;"&gt;&lt;img src="https://mycommunity.validity.com/t5/image/serverpage/image-id/539i7618F6EE205DF930/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AnthonyValidity_0-1712325422584.png" alt="AnthonyValidity_0-1712325422584.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Outer IF Function&lt;/STRONG&gt;:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The outermost IF function checks two conditions using the AND function.&lt;/LI&gt;
&lt;LI&gt;If both conditions are TRUE, it returns "NEW VALUE".&lt;/LI&gt;
&lt;LI&gt;If either condition is FALSE, it proceeds to the next part of the formula.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Nested IF Function&lt;/STRONG&gt;:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;If the outermost IF function's conditions are not met, the formula enters a nested IF function.&lt;/LI&gt;
&lt;LI&gt;The nested IF function also checks two conditions using the AND function.&lt;/LI&gt;
&lt;LI&gt;If both conditions are TRUE, it returns "NEW_VALUE_1".&lt;/LI&gt;
&lt;LI&gt;If either condition is FALSE, it proceeds to the next part of the formula.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Default Value&lt;/STRONG&gt;:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;If none of the conditions in the IF functions are met, the formula returns the original value of $(FIELD_B).&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;This formula checks the values of $(FIELD_A) and $(FIELD_B). If $(FIELD_A) is "VALUE A" and $(FIELD_B) is not "VALUE X", it returns "NEW VALUE". If $(FIELD_A) is "VALUE B" and $(FIELD_B) is not "VALUE Z", it returns "NEW_VALUE_1". If neither of these conditions is met, it returns the original value of $(FIELD_B).&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#993300"&gt;IF(&lt;/FONT&gt;&lt;FONT color="#33CCCC"&gt;AND(logical1, logical2)&lt;/FONT&gt;, &lt;FONT color="#993300"&gt;value_if_true&lt;/FONT&gt;, &lt;FONT color="#FF0000"&gt;IF(&lt;/FONT&gt;&lt;FONT color="#33CCCC"&gt;AND(logical1, logical2)&lt;/FONT&gt;, &lt;FONT color="#FF0000"&gt;value_if_true, value_if_false)&lt;/FONT&gt;&lt;FONT color="#993300"&gt;)&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2024 14:08:22 GMT</pubDate>
      <guid>https://mycommunity.validity.com/t5/demandtools/in-modify-module-use-nested-if-to-update-a-field/m-p/1916#M1055</guid>
      <dc:creator>AnthonyValidity</dc:creator>
      <dc:date>2024-04-05T14:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: In Modify Module use nested if to update a field</title>
      <link>https://mycommunity.validity.com/t5/demandtools/in-modify-module-use-nested-if-to-update-a-field/m-p/1917#M1056</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;Yes, your suggestion is working; duh me for not switching out the 'or' for the 'and'. So far, so good though.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Pam&lt;/P&gt;</description>
      <pubDate>Tue, 09 Apr 2024 12:05:56 GMT</pubDate>
      <guid>https://mycommunity.validity.com/t5/demandtools/in-modify-module-use-nested-if-to-update-a-field/m-p/1917#M1056</guid>
      <dc:creator>pgiovane</dc:creator>
      <dc:date>2024-04-09T12:05:56Z</dc:date>
    </item>
  </channel>
</rss>

