Logical Calculations for Dropdown Fields

By: Rex AZ | Asked: 06/01/2025
ForumsCategory: How-toLogical Calculations for Dropdown Fields
Rex AZRex AZ asked 2 weeks ago

Hi,

I am having challenges checking the value of a Yes/No dropdown when calculating a currency field.

For example, I have this formula below

[387] + (([382] >= 2018 && ([380] != "") && [381] != "") ? 30000 : ([382] >= 2018 && ([380] != "") && [381] == "") ? 45000 : ([382] <= 2017 && ([380] != "") && [381] != "") ? 70000 : ([382] <= 2017 && ([380] != "") && [381] == "") ? 90000 : ([382] == "" && ([380] == "") && [381] == "") ? 110000 : ([382] <= 2017 && ([380] != "") && [381] == "" && [393] != "No") ? 110000 : ([382] <= 2017 && ([380] != "") && [381] != "" && [393] != "") ? 110000 : 0 )

Expressions where Field [393] == Yes or No do not seem to evaluate at all. So, I get results for the other expressions without the field [393].

How can I resolve this?

Victor Font Staff replied 2 weeks ago

I wrote an answer but the forum didn't save it. You should get it through email.

Victor Font Staff replied 2 weeks ago

Also, Formidable does not store empty values in the database. So checking against an empty value, [393] != "", will never be evaluated because if there is no value, there is no entry for that field in the database.

Victor Font Staff replied 2 weeks ago

Set a default value for the field and you won't have to worry about the absence of value.

1 Answers
Rex AZRex AZ answered 2 weeks ago

Thanks everyone...I simply set it as separate values and compared the separate values rather than the labels, and it worked.Thanks.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right