Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to do a bit of repetitive work through a procedure. The procedure itself works fine, but when trying to feed in values I am getting null values. Below is the code, pretty sure its a simple mistake, so any help would be great.
LIST:
LOAD * INLINE [
Table Name, Search Value, First Wild, Second Wild, Tag
MONTHLY_LEU, PSO, *, *, PSO
MONTHLY_LEU, Imperfections Charge¬, *, *, IMPERFECTIONS
MONTHLY_LEU, Total Units, , *, POPULAR
MONTHLY_LEU, Moyle Interconnector Charge, *, *, MOYLE
MONTHLY_LEU, Availability Charge, *, *, AVAIL
MONTHLY_LEU, CCL¬, *, *, CCL
MONTHLY_LEU, SCC¬, *, *, SCC
MONTHLY_LEU, Monthly Charge¬, *, *, MARKET_OP_CHARGE
MONTHLY_LEU, Market Operator Charge¬, *, *, MARKET_OP_CHARGE
];
Let RCount=NoOfRows('LIST');
For i=0 to $(RCount) -1
call RateAndConsumption( peek([Table Name],$(i)),peek([First Wild],$(i)),peek([Second Wild],$(i)),peek(Tag,$(i)))
Next i;
Thanks
Paul
Hi Paul,
Are you trying to use Peek within Peek.
I tried the code
let x = peek('Table_Name',$(i), 'LIST');
It works fine
Outside from a load-statement peek() needed a table-name and field- and table-names should be in quotes:
peek(peek('Table Name',$(i), 'List')
- Marcus
Hi Marcus,
Thanks for the reply. Still struggling with this. I have changed it to input into a variable and still getting null. I assume I am doing something stupid?
Let RCount=NoOfRows('LIST');
For i=0 to $(RCount) -1
let x = peek(peek('Table Name',$(i), 'LIST'));
Next i;
Paul
Hi Paul,
Are you trying to use Peek within Peek.
I tried the code
let x = peek('Table_Name',$(i), 'LIST');
It works fine
HI,
Took out the double peal and that resolved it. Cheers for your help Markus.
Paul