Getting a calculated field to display data from several typeahead fields | Community
Skip to main content
Level 4
October 24, 2024
Question

Getting a calculated field to display data from several typeahead fields

  • October 24, 2024
  • 2 replies
  • 1378 views

Hi All,  I'm trying to create a calculated field that uses IF(ISBLANK logic to only display the typeahead that has data entered (only one field will have data due to display logic in the form).  Example below:

 

IF(ISBLANK({DE:typeahead field 1}.{name}),IF(ISBLANK({DE:typeahead field 2}.{name}),{DE:typeahead field 1}.{name}), {DE:typeahead field 2}.{name}))
 
my calculation isn't working and WF doesn't recognize the typeahead field names when I enter them into the code.
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

Level 4
October 24, 2024

I cleaned it up a bit but it returns a value of N/A.

Level 2
October 25, 2024

Hi Omaha,

 

This is a tricky one. If I recall (and I may be mistaken on this) typeahead fields act a little different than most fillable/selection custom fields. Rather than have the separator "." you should combine the expression field with ":". See my clean up below. 

 

IF(ISBLANK({DE:Typeahead Field 1:name}),IF(ISBLANK({DE:Typeahead Field 2:name}),"N/A",{DE:Typeahead Field 2:name}),{DE:Typeahead Field 1:name})

 

The N/A is in there if both fields are blank and good to spot check. 

 

Best,

Joaquin

 

If this helped, please mark this as answered so others can find it. 

Level 4
October 25, 2024

I tried that but even when one of the typeahead fields is populating is still produces N/A in the calculated field. Should I concat the fields first before running a calculation?

 

Level 2
October 25, 2024

It should work. I tested to make sure there weren't any other surprises. 🙂

 

Here's a couple steps I take when I know an expression should work but some how doesn't....

1) Double check the spelling on your custom fields.

2) Double check that the fields are filled out. You may need to do a spot check with filters for specific objects you are pulling data from. i.e. Object Name is equal to "Name of Object"

3) Lastly, this seems obvious, but it's one I've even fallen victim to, make sure the data is in the right object for the report you've created. i.e. in a project custom form for a project report. 

 

Best,

Joaquin