Good Morning!
I am new on Revolution and have some problems with data grid.
I am searching for a way to get several data from a column. For example I have a column with costs of some products and I have to sum up these costs but I don't know how to get the data for this specific column.
Could you help me please?
Thx!
extracting text from data grid
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: extracting text from data grid
Tiger,
Are you familiar with dgData and/or dgText?
For example: 'put the dgText of group "DataGrid 1" into tData' will put all the data from the grid into a variable from which you can pull out the data line by line and column by column.
For the brave: 'put the dgData of group "DataGrid 1" into tArray' will put all the data into an array from which you can extract individual items. It took me a while to get used to this one.
Hope this gets you started,
Larry
Are you familiar with dgData and/or dgText?
For example: 'put the dgText of group "DataGrid 1" into tData' will put all the data from the grid into a variable from which you can pull out the data line by line and column by column.
For the brave: 'put the dgData of group "DataGrid 1" into tArray' will put all the data into an array from which you can extract individual items. It took me a while to get used to this one.
Hope this gets you started,
Larry
-
- Posts: 6
- Joined: Mon May 31, 2010 7:36 am
Re: extracting text from data grid
Hey Larry,
I know dgData and dgText but I don't know how to get what I want out of the variable...
I know dgData and dgText but I don't know how to get what I want out of the variable...
Re: extracting text from data grid
dgText is the easiest to work with in that case. if you have previously set the itemDelimiter to tab you can just say:
'put item 3 of line 5 of tData into myVar' and you have the contents of cell 3 of line 5 in that variable.
Once the DataGrid is in tData, you have lines delimited by Returns and 'cells' within line delimited by Tabs. Those 'cells' (delimited by tabs) contain words which are delimited by spaces.
Depending on your data you can say things like:
answer word 2 of item 3 of line 6 of tData
Have fun,
Larry
'put item 3 of line 5 of tData into myVar' and you have the contents of cell 3 of line 5 in that variable.
Once the DataGrid is in tData, you have lines delimited by Returns and 'cells' within line delimited by Tabs. Those 'cells' (delimited by tabs) contain words which are delimited by spaces.
Depending on your data you can say things like:
answer word 2 of item 3 of line 6 of tData
Have fun,
Larry
-
- Posts: 6
- Joined: Mon May 31, 2010 7:36 am
Re: extracting text from data grid
Great!
Thank you very much!
Thank you very much!