Using IF and Contains in a calculated fields | Community
Skip to main content
Level 4
May 30, 2025
Solved

Using IF and Contains in a calculated fields

  • May 30, 2025
  • 1 reply
  • 957 views
I am trying to create a calculated field for a series of Tasks.
If the Task name Contains the number "1" I need it to display a date from the Project custom form.
I was able to return a True/False result using CONTAINS and I have been able to display the date without a condition but when combining the IF and CONTAINS functions I am getting no result.
Here is my expression - can anyone help?
IF(CONTAINS({name},"1"),{DE:UKI - Bet Offer 1 Banner Live Start Date & Time},"")
Best answer by _Manish_Singh

Hmm.. It would be..

IF(CONTAINS("1",{name}),{project}.{DE:UKI - Bet Offer 1 Banner Live Start Date & Time},"")

1 reply

_Manish_Singh
Level 9
May 30, 2025

Hello @thomasne2, Please try this..

IF(CONTAINS("1",{name}),{DE:UKI - Bet Offer 1 Banner Live Start Date & Time},"")
ThomasNe2Author
Level 4
May 30, 2025

Hi Manish - that's giving me N/A unfortunately. I have checked that the {name} is pulling from Task and the Custom Field is pulling on Project. 

_Manish_Singh
Level 9
June 9, 2025

Hi Manish - I have trialled this for a while and it's working great but I need the expressions to be able to update in real time without being prompted - how could that expression be translated to work in a view?


Hello Thomas, the calculated field updates in real-time. I'm not sure what you are referring to here. Are you talking about the report view? If so, you can directly add the calculated field in the report without an expression.