Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
venkatasubramanian
Contributor II
Contributor II

Getfield Selection value not available

I have used the following code to select a particular date. The issue here is, I am using a loop and export different selections for the same date, but if there is no date (i.e., the date which i have mentioned in my code "13") for a particular selection, it automatically exports all the date's data. Is there any solution for this.

ActiveDocument.GetField("My Calendar field").Select "13"

Thanks in advance.

Labels (1)
1 Solution

Accepted Solutions
m_woolf
Master II
Master II

It's difficult to give a precise answer when I can see only a single line of code. I'm thinking that if the date doesn't exist, then nothing gets selected.

Maybe something like:

ActiveDocument.GetField("My Calendar field").Select "13"
set val=ActiveDocument.Fields("My Calendar field").GetSelectedValues
if val.Count >0 then
     <Your code to export here>
end if

View solution in original post

2 Replies
venkatasubramanian
Contributor II
Contributor II
Author

I did not get the answer yet, please let me know if my question is not clear

m_woolf
Master II
Master II

It's difficult to give a precise answer when I can see only a single line of code. I'm thinking that if the date doesn't exist, then nothing gets selected.

Maybe something like:

ActiveDocument.GetField("My Calendar field").Select "13"
set val=ActiveDocument.Fields("My Calendar field").GetSelectedValues
if val.Count >0 then
     <Your code to export here>
end if