Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Retrieve values from Fields having numbers in Macro

Hi

I have a field of numeric userIds in my qvw document. I am not able to get the values of this field in the macro using

ActiveDocument.Fields("userId").GetPossibleValues().

Can somebody please let me know if I am missing something

Thanks and Regards

Ashwini

5 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Check with this

set val=ActiveDocument.Fields("Month").GetPossibleValues

for i=0 to val.Count-1

    msgbox(val.Item(i).Text)

next

Celambarasan

Not applicable
Author

Thanks for the reply. But this didnt work. Actually in my database the userId field have both strings and numerals. But i need just the numeric userIds. So in my load script i am loading only the userIds which are numeric in the filed userId

i.e

load if(isnum(userID),userID) as userId

resident userTable;

I am then trying to access the values of this field in macro and some how getting an error at

ActiveDocument.Fields("userId").GetPossibleValues()

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Check with this

set val=ActiveDocument.Fields("userId").GetPossibleValues

for i=0 to val.Count-1

    msgbox(val.Item(i).Text)

next

Celambarasan

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     What error you are getting?

Celambarasan

Not applicable
Author

I am not getting any error. when i run the macro it just stops at that line and does not execute further. I think the problem is that it is fetching a large data. The field userId has 437 userId in it. Is this the cause.. Can you suggest a way to handle this ?

Thanks

Ashwini