Concat a field name

Desiring to modify the field modified from a popup window:
Original update( that works):
UPDATE tanks SET PumpAuto_1 = {this} WHERE tank = {Root Container.Device}

Would like something like :
UPDATE tanks SET PumpAuto_1{Root Container.Suffix} = {this} WHERE tank = {Root Container.Device}

Would like to concat PumpAuto_1 with passed string {Root Container.Suffix}
so if ‘d’ is passed I would update PumpAuto_1d

So far everything I tried puts me into an error message that pops up every 2 secs - making it a pain to undo what I just messed up.


Ok, what you type in looked correct. Could you tell us what the error messages said?

(Tip: when error messages are popping up, if you minimize the error window, new errors will simply stack into that window rather than bombard you, so that you can go ahead and fix things)


With the above syntax I do not get an error - I just update PumpAuto_1 instead of PumpAuto_1d. If I try and modify the statement to something like ‘PumpAuto_1’+{Root Container.Suffix} or {‘PumpAuto_1’+Root Container.Suffix} I get an error in my statement.

Edit: - I probably need to make sure the ‘d’ is passing. I can’t check until tomorrow.

On the error message - I have tried minimizing and closing only to get it to pop up right over the area I need to undo. I’m not at the computer that the software is on at this time - but will try again.

You had it right in your first post:

UPDATE tanks SET PumpAuto_1{Root Container.Suffix} = {this} WHERE tank = {Root Container.Device}

The ideas in the second post weren’t correct - they were trying to use expression-like syntax in a SQL query binding, which isn’t what you want to do.

Hope this helps,

I think the reason it was not updating was I had restarted FactorySQL the groups had to be restarted also. I did not catch on to that at first.

Ah, so it is working now?