Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Script Line Error

Hi All,

I am getting a script line error while using Peek function to create a variable :

LET vCount3

= Peek('MyField', $(vCount2),'Test1');

Where

LET vCount2 = '$(vCount1)/2';
LET vCount1
= 'Count(Distinct MyField)';

Thanks!

11 Replies
Anonymous
Not applicable
Author

Hi,

Please copy paste whole script , so can help

Regards

Neetha

alexandros17
Partner - Champion III
Partner - Champion III

Right side of let instruction without apex

Anonymous
Not applicable
Author

Hi Neetha,

Thanks for your reply.

The script is nothing much. A straight forward load statement to load few fields from a qvd and then I am tring to create these variables.

First 2 variables are created correctly, its just when I am trying to create the third variable i.e. vCount3, it throws a script line error.

I have tried using 'Fieldvalue' function instead of peek as well. But same error. 😞

Anonymous
Not applicable
Author

Hi Alessandro,

Do you mean ' ' by apex?

Anonymous
Not applicable
Author


Okay, so i haved added ' ' , now there is no error but it returns an empty vCount3, so the variable expression now looks like:

LET vCount3 = Peek ('MyField', '$(vCount2)', Test1');

but returns an empty value. Any clues?

Anonymous
Not applicable
Author

Hi,

please check value in variable vCount2 using textbox in ui.

and check if value for previous row in table is not null.

see how many records are in table.

Anonymous
Not applicable
Author

Hi Neetha,

vCount1 and vCount2 both give correct results.

And none of the row is null.

alexandros17
Partner - Champion III
Partner - Champion III

LET vCount2 = $(vCount1)/2;
LET vCount1
= Count(Distinct MyField);

Colin-Albert

what is the value of vCount2? It must be an integer for PEEK.

You can test your peek command using     

LET vCountTest = Peek('MyField', 1, 'Test1');