|
| [WD21] Difference of TABLE.. and TABLE[TABLE].. |
| Iniciado por guest, 20,jul. 2017 12:14 - 4 respuestas |
| |
| | | |
|
| |
| Publicado el 20,julio 2017 - 12:14 |
I can't find this in the tutorial book or the concepts book.
We have code like IF TABLE_Example[TABLE_Example].COL_Title <> "" THEN //do something END
We also have code like IF TABLE_Example.COL_Title <> "" THEN //do something END
There seems to be no difference.
But trying to use TABLE_Example[TABLE_Example]..FontStrikeOut = True works, trying to use TABLE_Example..FontStrikeOut does not work? (I'm getting an compile error: The 'FontStrikeOut' property does not apply to this type of control.)
So I'm missing something. What is the difference between the two? |
| |
| |
| | | |
|
| | |
| |
| Publicado el 20,julio 2017 - 12:31 |
Hi.
TABLE_Example refer to control table.
TABLE_Example[TABLE_Example] refer to current table line, the last add to table for example.
The properties for table and line are diferents.
Rubén |
| |
| |
| | | |
|
| | |
| |
| Publicado el 21,julio 2017 - 08:21 |
Thanks for the answer.
So TABLE_Example is different from TABLE_Example[TABLE_Example], but there is really no difference between using TABLE_Example.COL_Title and TABLE_Example[TABLE_Example].COL_Title as both will point to the same column of the current table line.
Greetings
Christine |
| |
| |
| | | |
|
| | |
| |
| Publicado el 21,julio 2017 - 11:14 |
Christine, Both will work but under some situation will fail you, like if the table is empty and you have code on the "Selecting a table row" process of the table control.
Better practice would be something like.
nRow is int = tableselect(TableExample) //Or if you are looping thru the table use "Currentsubscript" nRow is int = CurrentSubscript(TableExample) //This would be for code used on the "Displaying a table row" of a table control if nRow = -1 return (Or error message) TableExample[nRow]..FontBold = true DW |
| |
| |
| | | |
|
| | |
| |
| Publicado el 21,julio 2017 - 16:15 |
Thanks a lot for this explanation. It is clearer now for me.
Greetings Christine |
| |
| |
| | | |
|
| | | | |
| | |
|