This content has been marked as final. Show 4 replies
Im developing an application where i first produce a list of field values that a later on send to a sub-routine that uses the field value when creating a table.
It works as expected if i do not create a table inside my sub-routine but the peek('fieldname',$(i)) I use to get the field value from the first table to send to the sub-routine only works for i = 0 (or the first peek() used.
Any suggestion that the issue could be?
I've attached a small qv app that shows the issue, setting the last parameter in the sub-routine call to 'Y' breaks the peek(). Setting it to 'N' everything is working as expected (as no table is created inside the sub-routine).
trace inside sub-routine month is '$(inputMonth)';
if '$(createTableYN)' = 'Y' then
'$(inputMonth)' as subMonth
month(addmonths(yearstart(today()),recNo())) as month
// by creating a table in the sub-routine call (last parameter = 'Y') the peek will cease to function properly as only first value is fetched
for i = 0 to fieldvalueCount('month')-1
Let vMonth = peek('month',$(i));
App has been tested in 11.2 SR4 and 11.2 SR6 with the same result.