Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
santho_ak
Partner - Creator III
Partner - Creator III

Auto generate function

Hello,

Is there any script to load something like this in a column.

Column 'Status' should have random values like 'Received',  'Approved', 'Pending', 'Denied'.

Thanks in advance. !

Attached qvf . Tried out Mapping & Pick in script. Getting error, help would be highly appreciated. Thanks!

https://community.qlik.com/blogs/qlikviewdesignblog/2016/01/15/autogenerate-your-data?et=blogs.comme...

1 Solution

Accepted Solutions
MarcoWedel

Hi,

you used the wrong quotation marks to name the mapping table in the ApplyMap function.

The correct ones are Chr(39).

Another thing is, that you cannot drop the field "Map" as this is the mapping table name instead of a field.

QlikCommunity_Thread_313363_Pic1.JPG

QlikCommunity_Thread_313363_Pic2.JPG

hope this helps

regards

Marco

View solution in original post

4 Replies
MarcoWedel

Hi,

you used the wrong quotation marks to name the mapping table in the ApplyMap function.

The correct ones are Chr(39).

Another thing is, that you cannot drop the field "Map" as this is the mapping table name instead of a field.

QlikCommunity_Thread_313363_Pic1.JPG

QlikCommunity_Thread_313363_Pic2.JPG

hope this helps

regards

Marco

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

It looks like you copy/pasted from the blog post and got backticks instead of single quote around 'map'.  It should be:

ApplyMap('Map',Ceil(Rand()*4)) AS Status

-Rob

santho_ak
Partner - Creator III
Partner - Creator III
Author

Thank you guys. Appreciate your help.

santho_ak
Partner - Creator III
Partner - Creator III
Author

Just in case, if someone looking for addition help to auto generate data. Please use ctrl+0+0, it will generate Qlik script with random data.

https://optimalbi.com/blog/2017/11/15/qlik-basics-random-data-generation/