Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
jagannalla
Partner - Specialist III
Partner - Specialist III

Display the data in combobox

Hi,

I want to display the data in the form of combobox with values 'yes' and 'No'. If he select 'yes" i should get like this( ask for filename to include entire path).

8 Replies
rbecher
MVP
MVP

Hi Boppy,

try this:

IF vGetFileName = 'Yes' THEN
let vFileName = Input('Enter Filename:', 'Input box');
END IF


- Ralf

Astrato.io Head of R&D
jagannalla
Partner - Specialist III
Partner - Specialist III
Author

But, how can i display the values yes and no in Inputbox..

rbecher
MVP
MVP

You can configure this:

..and will get a drop down input box:

- Ralf

Astrato.io Head of R&D
Not applicable

Hi,

Which component are you using? And where do you paste this code?

Thanks

rbecher
MVP
MVP

Using Input Box,

the code goes to the load script.

- Ralf

Astrato.io Head of R&D
jagannalla
Partner - Specialist III
Partner - Specialist III
Author

Hi Ralf,

Thanks for u solution. But, when i use the code in the edit script and reload the script i getting the Input box. My task is not like dat. The task is when i select the Yes in the input box. I shoud get the Input box asking "Enter the filename"..But, once again thanks to give me solution. I hope u understood my problem. I'm waiting for the solution.

rbecher
MVP
MVP

Ok, now I hope to understand.. 😉

You could have one input variable for the filename too. If it's filled with a filename and the other variable is set to 'Yes' you can use the filename in the scrpit. Otherwise you use the standard filename in the script.

- Ralf

Astrato.io Head of R&D
Not applicable

Hi,

You would need to place a trigger on the input variable vGetFileName

Settings > Document Properties > Triggers > Variable Event Triggers

Select vGetFileName and click Add Action(s)...

Add > External > Run Macro > Edit Module

Paste in the Edit Module, the following code:


Sub GetFileName
Set a=ActiveDocument.Variables("vGetFileName")
In_val=a.GetContent.String
if In_Val = "Yes" Then
tmp = inputBox("Input your FileName")
ActiveDocument.Variables("vFileName").SetContent tmp, true
End If
End Sub


And make sure to fill the right MacroName ("GetFileName")

And that is it. See the attached example.