0

It's possible to assign the name of a table from a variable?

I have a table (Tables) that gathers the name of several tables.

I have created a variable that takes the name of each table:

let myT := this.text(name.Table),

but when I want to use the variable myT to substitute the table name using select :

sum ((select myT).Incomes) - sum ((select myT).Debits,

not working (table myT not found).

I hope your answer. Thanks.

2 replies

null
    • Ninox partner
    • RoSoft_Steven.1
    • 2 yrs ago
    • Reported - view

    Clonev,

    you can use the eval() function for this:

    let myT := this.text(name.Table);

    let script:= "sum ((select"+myT+").Incomes) - sum ((select"+ myT+").Debits";

    eval(script,this)

    Steven

    • clonev
    • 2 yrs ago
    • Reported - view

    Thanks Steven. I will try it, this afternoon.

Content aside

  • 2 yrs agoLast active
  • 2Replies
  • 215Views