Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
He everybody[:)],
still my English is not better. So sorry for that!
I would like to write a Value in a field of a table.
Can somebody help me please?
Something like … fieldname (row number, table).value = 100
THANKS
John
QV -Beginner
I don't think you can directly change the values in a table like that. I assume this is attempted while loading, right? You then would be better off trying to load all fields of the source table, minus the field you are trying to change and laod the changed field with the calculation you want.
Hope that helps.
Regs, Hans Peter
Hi John,
you can use Peek function:
let StartDate = peek('StartDate',0) ;
QlikView Help Reference:
Returns the contents of the fieldname in the record specified by row in the input table tablename . Data are fetched from the associative QlikView database.
Fieldname must be given as a string (e.g. a quoted literal).
Row must be an integer. 0 denotes the first record, 1 the second and so on. Negative numbers indicate order from the end of the table. -1 denotes the last record read.
If no row is stated, -1 is assumed.
Tablename is a table label without a colon at the end. If no tablename is stated, the current table is assumed.
peek( 'Sales' )
returns the value of Sales in the previous record read ( equivalent to previous( Sales ) ).
peek( 'Sales', 2 )
returns the value of Sales from the third record read from the current input table.
peek( 'Sales', -2 )
returns the value of Sales from the second last record read into the current input table.
peek( 'Sales', 0, Tab1 )
returns the value of Sales from the first record read into the input table labeled Tab1.
Normal 0 21 false false false DE X-NONE X-NONE MicrosoftInternetExplorer4
He Shumail Hussain,
thanks for the your work and the quick answer !
I'm sorry it doesn't work.
I look for a solution for this.
// FOR i = 0 TO (NoOfRows('TabMatrixDubTmp')-1);
//
// LET vCorFamNo = 1000 + i;
//
// LET peek(CorFamNo,i,TabMatrixDubTmp) = vCorFamNo;
//
// NEXT
Normal 0 21 false false false DE X-NONE X-NONE MicrosoftInternetExplorer4
Regards
John
QV-Beginner
I don't think you can directly change the values in a table like that. I assume this is attempted while loading, right? You then would be better off trying to load all fields of the source table, minus the field you are trying to change and laod the changed field with the calculation you want.
Hope that helps.
Regs, Hans Peter