Is it possible to work with variables in new fields?
I can only assign data from the database. Did I miss something?
I’m trying to create another column in the list, which shows me the result of the ‘profit’ + ‘swap’ field.
Is it possible to work with variables in new fields?
I can only assign data from the database. Did I miss something?
I’m trying to create another column in the list, which shows me the result of the ‘profit’ + ‘swap’ field.
I believe I found a way.
onRecord
Ex. {fld_total} = {fld_price} - {fld_discount};
It is possible to read or write data from/on any applications field.
But I can’t find any instructions on how I can add up the fields profit and swap and then display them in a new variable (e.g. at the end of the line)
There are so many macros. But none seem to fit.
This will not work:
{sc_fld_test} = {sc_fld_profit} + {sc_fld_swap};
Change to:
{sc_fld_test} = ({sc_fld_profit} + {sc_fld_swap});
Apparently the variable name is wrong.
Or do I have to define it somewhere?
Why do you add a prefix before field sc_field_xxxx
Based on your picture above, it would be correct:
{test} = ({profit} + {swap});
Great… it works.
I thought you always have to use this prefix in Scriptcase.
Sorry … I’ve been out of programming for a long time.