Assigning a variable as the table name.
Hi All,
Is it possible to use a variable as a table name?
For example I have 5 tables (Table1, Table2, Table3, Table4 and Table5)
I have a variable called RANDOMTABLE which produces a text value of (Table1, Table2, Table3, Table4 or Table5)
Now what I want is this:
Set self.MyValue to: tableCellValue(RANDOMTABLE, 1,1)
So in theory (though it doesnt work which is why i need help) this should be read by GameSalad if RANDOMTABLE is Table2 as:
Set self.MyValue to: tableCellValue(Table2, 1,1)
(This then sets MyValue to whatever is in 1,1 on Table2
--------
The reason I need this is I have 6 Tables each with lots of data in them. The buttons the user presses throughout the application assign variables to values to draw out specific bits of information from the tables. This requires a vast amount of if statments to be used unless I can use a variable as the table name.
Any help would be appreicated.
Cheers
S
Is it possible to use a variable as a table name?
For example I have 5 tables (Table1, Table2, Table3, Table4 and Table5)
I have a variable called RANDOMTABLE which produces a text value of (Table1, Table2, Table3, Table4 or Table5)
Now what I want is this:
Set self.MyValue to: tableCellValue(RANDOMTABLE, 1,1)
So in theory (though it doesnt work which is why i need help) this should be read by GameSalad if RANDOMTABLE is Table2 as:
Set self.MyValue to: tableCellValue(Table2, 1,1)
(This then sets MyValue to whatever is in 1,1 on Table2
--------
The reason I need this is I have 6 Tables each with lots of data in them. The buttons the user presses throughout the application assign variables to values to draw out specific bits of information from the tables. This requires a vast amount of if statments to be used unless I can use a variable as the table name.
Any help would be appreicated.
Cheers
S
Answers
Thanks for letting me know.
S