If statement returns "Y" or "N", I want to use this in a filter
I made a calculation field which returns "Y" or "N". I want to make a filter which only shows the items which returns "Y". I tried to make a if statement which returns 1 or 0 as a number but I receive the error that I make an statement to a number. I can't make a filter with a calculation field. Can anybody help me with a workaround? Thanks a lot! var today = moment().month() var Q1 = moment(@Q1).month() var Q2 = moment(@Q2).month() var Q3 = moment(@Q3).month() var Q4 = moment(@Q4).month() if (Q1 == today || Q2 == today || Q3 == today || Q4 == today){"Y"}else{"N"}

  • Hey Frank, My guess is that you are wanting to use this field to use the filter on the Podio front end (the funnel on the app view), so that you can only view certain items. Unfortunately you can't use a calculation field to filter at all, but if you do a bit of development you can make an automation using the API to automatically tag the item as a Y/N and then you can use the tags to filter on the front end. If you don't have any development experience feel free to reach out as I have quite a bit of experience doing these types of automations.
  • Hi Frank The filter is applicable only on a number field and your calculation field is a text one ("Y" or "N") solution : Create a new calculation field (Calc-field2) insrt this code : var calc = @calc-field1 calc == "Y" ? 1 : 0 Then make your filter on this new field with 1 for "Yes" and 0 for "No" Or simply copy your code in a new calc field and replace "Y" by 1 and "N" by 0 then delete your firs calc field
This question is closed.