Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
amars
Specialist
Specialist

showing all data for a field using macro.

Hi all,

I have put this post earlier but didn't get any reply. I want to know how to show all data for a field using a macro. Is there some function like ShowAllData(), which I can use for a field. Since data get's reduced due to section access. Thank's in advance.

Regard's

Amar

1 Solution

Accepted Solutions
amars
Specialist
Specialist
Author

Hi guy's ,

This is to share an alternative I found. What I did is I didn't put the currencies selected initially but after data get's reduced (i.e. after Login) in AfterOpen Macro . I selected the value for the currency field using a macro & also set the Alway's one selected value option through the macro. The Macro is like this

sub OpenInitialSelection

ActiveDocument.Fields("Currency").unlock
ActiveDocument.Fields("Currency").clear
set f=ActiveDocument.Fields("Currency")
set val=ActiveDocument.Fields("Currency").GetPossibleValues
f.toggleselect val.Item(0).Text
ActiveDocument.Fields("Currency").lock
set fprop = f.GetProperties
fprop.OneAndOnlyOne = true
f.SetProperties fprop
end sub

This is just to share this with you.

Regard's

AmarBig Smile

View solution in original post

4 Replies
Not applicable

Hi,

i´not sure if it´s what you want, but you can list all possible values in a messagebox with following code:


sub list()

set val=ActiveDocument.Fields("F1").GetPossibleValues
dim list

for i=0 to val.Count-1
list = list + Chr(13) + Chr(10) + val.Item(i).Text
next

msgbox(list)

end sub

Greets

Anonymous
Not applicable

Hi Amar,

It sounds like you want to show data that has been reduced away by Section Access? This can't be done since each user is just entitled to the data that's part of their reduction criteria. You can of course create a user/admin who can see everything..?

amars
Specialist
Specialist
Author

Hi all,

My case is. I do have a sales Qlikview file. In that I allow user's to see sales in selected currency (by using "Always one value selected"). Now I wish to create different user's for the file (admin, GroupAdmin, user). I use reduce data based on section access to reduce the data for that specific user. but along with the user the currencies that I allow user to select also get's reduced. I wish to find some way so Section access also remain's and user can select one currency at a time from the given currencies. Thank's a lot.

Regard's

Amar

amars
Specialist
Specialist
Author

Hi guy's ,

This is to share an alternative I found. What I did is I didn't put the currencies selected initially but after data get's reduced (i.e. after Login) in AfterOpen Macro . I selected the value for the currency field using a macro & also set the Alway's one selected value option through the macro. The Macro is like this

sub OpenInitialSelection

ActiveDocument.Fields("Currency").unlock
ActiveDocument.Fields("Currency").clear
set f=ActiveDocument.Fields("Currency")
set val=ActiveDocument.Fields("Currency").GetPossibleValues
f.toggleselect val.Item(0).Text
ActiveDocument.Fields("Currency").lock
set fprop = f.GetProperties
fprop.OneAndOnlyOne = true
f.SetProperties fprop
end sub

This is just to share this with you.

Regard's

AmarBig Smile