Using a variable to select a field

314
0
05-15-2022 06:31 PM
Labels (1)
by Anonymous User
Not applicable

Hi everyone,

How are field names stored as variables? I thought it was just text but I think I'm missing something.

I'm trying to calculate a field ('Flow') in a table, where the data already exists in one of F1, F2, F3,... FN fields in the table. There's another field (destination) that I want to use to point to the right F field. So:

Flow = $feature[Concatenate('F', Text($feature[destination]))]

So $feature[destination] should point to the right 'F' field to use. But it says there's no 'F3' field for example, but if I go 

Flow = $feature['F3']

then it works. I also found that even 

Flow = $feature[Concatenate('F', Text(3))]

doesn't work (no such field as 'F3'). What am I misunderstanding about field names? Why is 'F3' a valid field but Concatenate('F', '3') isn't?

Thank you!

0 Kudos
0 Replies