Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a field that has a the value 1 everytime a condition is met. I want to in another field(one we will be creating) add a condition that says if the value in field1 = 1 then in the next recno() put a 1. How the hell do I do this
Cheers,
Byron
I used the following script and it seemed to work for me.
Data:
LOAD IterNo() as ID, Round(Rand()) as Field1 AutoGenerate 1 While IterNo() <= 10;
Left Join (Data) LOAD ID, Field1, If(Peek(Field1)=1,1,0) as Field2 Resident Data;
Is this what you wanted to do?
You may try something like this:
LOAD ...,
If(Peek('field1')=1,1) as another-field,
...
Have tried that before, doesnt work. No matter my order by nothing, sadly 😞 I've concluded that i need to somehow use recno() next... to insert my value. Want to know if anyone has managed to do this?
Thanks,
byron
I used the following script and it seemed to work for me.
Data:
LOAD IterNo() as ID, Round(Rand()) as Field1 AutoGenerate 1 While IterNo() <= 10;
Left Join (Data) LOAD ID, Field1, If(Peek(Field1)=1,1,0) as Field2 Resident Data;
Is this what you wanted to do?
It is, thank you very much