Skip to main content
Question

If statement based on field ID

  • Jul 16, 2018 12:38 AM UTC
  • 7 replies
  • 41 views

I want to do an if statement based on a field ID and the field ID number should be a value from a different field.

Like:

If(_fid_[field that has the ID I want to base on]>=1,true,false)

Thanks
This topic has been closed for replies.

7 replies

Formulas work on field names, not field IDs.  They adjust automatically if you change the field name.

IF([my field]>1, true)

  • Author
  • Qrew Corporal
  • Jul 16, 2018 1:26 AM UTC
I understand that is the standard. I was wondering if there is anyway to base it on the field id.

Thanks for your reply

  • Qrew Corporal
  • Jul 16, 2018 1:34 AM UTC
You can do this:
[_fid_6]

Well, live and learn. Is there ever a benefit such syntax.

  • Author
  • Qrew Corporal
  • Jul 16, 2018 2:40 AM UTC
Thanks Dan,

I am trying to put instead of [_fid_6] I want to replace the 6 with a field that has the value of the field id number....

Can this be done via script?

Like:  [_fid_[field that has the ID I want to base on]]

Thanks again

  • Qrew Corporal
  • Jul 16, 2018 5:38 AM UTC
Case([fid],
  6, [_fid_6],
  7, [_fid_7],
  8, [_fid_8],
  9, [_fid_9]
)

  • Author
  • Qrew Corporal
  • Jul 16, 2018 7:01 AM UTC
Thats a good idea but still does not make it fully open since you still need to hard code each field ID

Thanks for the idea.