Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
emteam162
Creator
Creator

InputBox

Hi,

I have issue with input box

i use this macro to remove variable from input box

with  GetRowCount=6

when i remove two variables normally i will have GetRowCount=4 when i save my application

but GetRowCount is still have value 6

set obj = ActiveDocument.GetSheetObject("IB16")

for RowIter = 0 to obj.GetRowCount-1

msgbox obj.GetRowCount  &  " RowIter  " & RowIter

    'for ColIter =0 to obj.GetColumnCount-1

        set cell = obj.GetCell(RowIter,2)

        msgbox(cell.Text)

        if len(cell.Text)=0 then

        obj.RemoveVariable RowIter

      

    end if

i want remove all variable how has null value from input box

Many thanks for your help

Emteam

1 Solution

Accepted Solutions
Not applicable

hi

see this link,for  clear value in input box.

http://community.qlik.com/thread/64442

http://community.qlik.com/thread/72231

try this code

sub clear

set v = ActiveDocument.Variables("Variable1")

prop = v.GetProperties

dim list

list=Array("abc","45","xyz","")

prop.PreDefinedList = list

v.SetProperties prop

set ClearAllib = ActiveDocument.GetSheetObject("IB10")

ClearAllib.SetVariableContent 0,"",true

Erase list

list=Array("abc","45","xyz")

prop.PreDefinedList = list

v.SetProperties prop

end sub

Regards

vishwaranjan

View solution in original post

3 Replies
Not applicable

hi

see this link,for  clear value in input box.

http://community.qlik.com/thread/64442

http://community.qlik.com/thread/72231

try this code

sub clear

set v = ActiveDocument.Variables("Variable1")

prop = v.GetProperties

dim list

list=Array("abc","45","xyz","")

prop.PreDefinedList = list

v.SetProperties prop

set ClearAllib = ActiveDocument.GetSheetObject("IB10")

ClearAllib.SetVariableContent 0,"",true

Erase list

list=Array("abc","45","xyz")

prop.PreDefinedList = list

v.SetProperties prop

end sub

Regards

vishwaranjan

emteam162
Creator
Creator
Author

Hi,

Many thanks for your answer its help me

Best Regards,

Emteam

Not applicable

hi emteam162

if your problem resolved then marked it as either correct or helpful according to your question, and close this thread, so that it might be helpful for other developer.

Regards