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

Open input box expression dialog via Macro

Hi all,

does anybody know if and how it is possible to open the expression dialog of a variable input box via Macro?

The user should use the expression dialog instead of just pasting in content in the input box entry line.

(the expression dialog can be opened manually by clicking on the three dots on the right of the entry line after clicking in that space).

Alternatively, is it possible to prevent Qlik from converting line breaks into white spaces when copying in content directly in the entry line?

Thank you

Stefan

1 Solution

Accepted Solutions
marcus_sommer

Hi Stefan,

I see the problem ... but there seems not much how it could be solved or bypassed whereby as I copied some dummy-values from a textbox with the variable-content into notepad++ I noticed that there are two spaces instead of the line-break and this should rather seldom occur within the normal values and could be therefore used for reversing them again into a line-break.

- Marcus

View solution in original post

6 Replies
marcus_sommer

Hi Stefan,

if I look in the APIGuide there seems nothing suitable for opening the expression-dialog.

To the second part of preventing the line-break conversion I'm not sure if it's possible but it should be possible to reverse this result afterwards. Maybe this is starting point for such an approach: Re: Inputbox not more then 25000 Char's.

- Marcus

swuehl
MVP
MVP
Author

Hi Marcus,

I am doing pretty much the same as discussed in that thread, my question is basically how to handle the untrained users from Gerold's last post.

If you paste a list of values to select directly into the Input box entry field (not using the expression dialog), the line breaks seem to be transformed to spaces.

I can handle these spaces, but only if I can be assured that there are no spaces within the values to select.

marcus_sommer

Hi Stefan,

I see the problem ... but there seems not much how it could be solved or bypassed whereby as I copied some dummy-values from a textbox with the variable-content into notepad++ I noticed that there are two spaces instead of the line-break and this should rather seldom occur within the normal values and could be therefore used for reversing them again into a line-break.

- Marcus

swuehl
MVP
MVP
Author

Hi Marcus,

that's a good catch, didn't noticed that there are in fact two spaces.

I've used this as criterium to decide if we need to handle this as value separator or part of the value, seems to work quite well.

Thanks!

Stefan

qvwarning
Creator
Creator

Hi Stefan,

you can try to use in macro: Inputbox.SetVariableContent

Set IPB=ActiveDocument.GetSheetObject("IBxx")

IPB.SetVariableContent,0,"Text or Num or Variable", True

0 - Row of inputbox (0= first line in box)

Text or Num or Variable = String

(see also API V11)

and you can declare the string in a separately dialog/macro.

Andreas

swuehl
MVP
MVP
Author

Hi Andreas,

how would I do this in a separate dialog?

I know the InputBox / InputBoxEx dialog, but this is limited in the text length it accepts.

Regards,

Stefan