Forum Discussion

OwenMorgan's avatar
OwenMorgan
Qrew Member
6 years ago

if text formula

Hello
I am importing Data where there are 3 fields that need to combine to one. 
The 3 fields are
1. [Batch Type] (Decline Unless Challenged, For Discussion at Update Meeting, CSS Decline, CSS Recommend, (empty))
2. [Accepted?] (boolean)
3. [Declined?] (boolean)

The new field [new batch type] can be one of 4 options ("Accepted", "Declined", "For Discussion at Update Meeting" or "No Recorded Decision"

I want to post the [batch type] in this box but if one of the booleans is ticked, allow that to override the original. 

I created a new field that switches the boolean to text ("Accepted", "Declined", "AcceptedDeclined", (empty)) so that they were all text fields and we just had to look at two fields. I created this but it is not working... 

If(
[Batch Type]="Declined Unless Challenged" & If([Accepted or Declined]="Declined", "Declined"),
[Batch Type]="Declined Unless Challenged" & If([Accepted or Declined]="Accepted", "Accepted"),
[Batch Type]="Declined Unless Challenged" & If([Accepted or Declined]="", "Declined"),
[Batch Type]="For Discussion at Update Meeting" & If([Accepted or Declined]="", "For Discussion at Update Meeting"),
[Batch Type]="For Discussion at Update Meeting" & If([Accepted or Declined]="Accepted", "Accepted"),
[Batch Type]="For Discussion at Update Meeting" & If([Accepted or Declined]="Declined", "Declined"),
[Batch Type]="For Discussion at Update Meeting" & If([Accepted or Declined]="AcceptedDeclined", "For Discussion at Update Meeting"),
[Batch Type]="" & If([Accepted or Declined]="Declined", "Declined"),
[Batch Type]="" & If([Accepted or Declined]="Accepted", "Accepted"),
[Batch Type]="CSS Decline", "Declined",
[Batch Type]="CSS Recommend", "Accepted",
"No Recorded Decision")

I also tried the embedded IF with the booleans too but that didn't work either. 

What am i missing?!

------------------------------
Owen Morgan
------------------------------
  • Owen,

    You have to keep you if statements in the format of 
    Condition, Result, Other Result

    If(
    [Batch Type]="Declined Unless Challenged" and [Accepted or Declined]="Declined", "Declined",
    [Batch Type]="Declined Unless Challenged" and [Accepted or Declined]="Accepted", "Accepted",
    [Batch Type]="Declined Unless Challenged"  and [Accepted or Declined]="", "Declined",
    [Batch Type]="For Discussion at Update Meeting" and [Accepted or Declined]="", "For Discussion at Update Meeting",
    [Batch Type]="For Discussion at Update Meeting" and  [Accepted or Declined]="Accepted", "Accepted",
    [Batch Type]="For Discussion at Update Meeting"  and [Accepted or Declined]="Declined", "Declined",
    [Batch Type]="For Discussion at Update Meeting" and [Accepted or Declined]="AcceptedDeclined", "For Discussion at Update Meeting",
    [Batch Type]="" and [Accepted or Declined]="Declined", "Declined",
    [Batch Type]="" and [Accepted or Declined]="Accepted", "Accepted",
    [Batch Type]="CSS Decline", "Declined",
    [Batch Type]="CSS Recommend", "Accepted",
    "No Recorded Decision")


    ------------------------------
    Don Larson
    Paasporter
    Westlake OH
    ------------------------------
    • OwenMorgan's avatar
      OwenMorgan
      Qrew Member
      Success!! thank you

      ------------------------------
      Owen Morgan
      ------------------------------
    • OwenMorgan's avatar
      OwenMorgan
      Qrew Member
      I spoke a bit too soon... 
      All working except the last two lines which are just receiving "no recorded decision"

      These two:
      [Batch Type]="CSS Decline", "Declined",
      [Batch Type]="CSS Recommend", "Accepted",

      ------------------------------
      Owen Morgan
      ------------------------------
      • DonLarson's avatar
        DonLarson
        Qrew Elite
        Owen,

        Any chance of spelling error against the data source?

        CSS Declnie  instead of CSS Decline   

        Matching text is challenging for strings as we read what we want to see and the computer reads what is actually there.
        Also if there is an extra space:      CSS  Decline  is not CSS Decline

        Your logic should be good, I suspect it is syntax.


        ------------------------------
        Don Larson
        Paasporter
        Westlake OH
        ------------------------------