Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HEy,
WHat is the function of Autogenerate() ??
Example autogenerate 1 , autogenerate 2 , autogenerate 10 ??
Thanks
you can use autogenerate when you are building data in your script, the number specify the number of records to be generated.
Hey,
If i say :
autogenerate 5;
Then , in this case will it ask me 5 times values to input or will it ask me only once and repeat the same value 5 times ??
Thanks
Hi,
Autogenerate() is used in Load statement to iterate record by record without any table. Check example below to generate some sample data the AutoGenerate() is used
SampleData:
LOAD
Rand() * 100 AS Sequence,
'Product' & Ceil(Rand()) * 100 AS Product
Ceil(Rand()) * 1000 AS Sales
Autogenerate(3);
When you execute above script 3 sample records are generated, it is similar to for loop which loops 3 times.
Hope this helps you.
Regards,
Jagan.
Hey,
Let say if i have use dfollowing code :
Data3:
LOAD
Input('Enter value', 'Input box') AS InputValue
AutoGenerate 3;
Then in this case it is asking value only 1 time and using same value in other repetition also. If i input value 12 , then it wil show 12 three times.
Does it behave in same order ??
Thanks.
Hi,
Not sure about Input() in AutoGenerate(), may the functionality is like that for Input() i.e, it will take input only for one time.
If you want to input 3 values, use 3 load statements and concatenate all the tables.
Hope this helps you.
Regards,
Jagan.