Text mining and content categorization

How to clear the listbox selections in SAS AF when i use multiple selections?

Reply
New Contributor
Posts: 4

How to clear the listbox selections in SAS AF when i use multiple selections?

I am creating a GUI.

 

i created a list box with multiple selections. Now i need to clear it using a push button. Can anyone help me to do that ?

New Contributor
Posts: 4

Re: How to clear the listbox selections in SAS AF when i use multiple selections?

THis is my Work so far

 

pushbutton2:                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                
if Listbox2.SELECTEDITEMS ne ' '                                                                                                                                                                                                                                
then                                                                                                                                                                                                                                                            
do;                                                                                                                                                                                                                                                             
submit continue;                                                                                                                                                                                                                                                
Listbox2.SELECTEDITEMS ='';                                                                                                                                                                                                                                     
endsubmit;                                                                                                                                                                                                                                                      
end;                                                                                                                                                                                                                                                            
return;                  

But it is not working
Respected Advisor
Posts: 2,993

Re: How to clear the listbox selections in SAS AF when i use multiple selections?

[ Edited ]

Well its been a very long time since I used SAS/AF and I can't test this for you but I would try something like this. You need to use SCL statements to clear the selections, not a SUBMIT block. 

 

pushbutton2:                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                
if Listbox2.SELECTEDITEMS ne ' '                                                                                                                                                                                                                                
then                                                                                                                                                                                                                                                            
do;                                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                             
Listbox2.SELECTEDITEMS ='';                                                                                                                                                                                                                                     
refresh;
                                                                                                                                                                                                                                                     
end;                                                                                                                                                                                                                                                            
return;                  

 

New Contributor
Posts: 4

Re: How to clear the listbox selections in SAS AF when i use multiple selections?

Thank you for the reply.

But still it is not working

Respected Advisor
Posts: 2,993

Re: How to clear the listbox selections in SAS AF when i use multiple selections?

Perhaps start by testing your pushbutton like so. A message should show in the message line when the button is pressed.

 

pushbutton2:                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                
_msg_ = 'Button Pressed'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
return; 
Ask a Question
Discussion stats
  • 4 replies
  • 121 views
  • 0 likes
  • 2 in conversation