Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expressions in text box query

Hi All

I am using a text box to display a GP Code by using the following script:

='GP Code: ' & concat(DISTINCT [Practice Code],', ')

The problem is that this returns all of the possible data entries.

What I'd like it to do is for the text box to be blank unless "Client Number" or "NHS Number" is selected.

I have tried to combine the above with "getcurrentfield" (getselectedcount([NHS Number])>0 or getselectedcount([Client Number])>0 ) but this doesn't work

I'd appreciate any advice on this please

Thank you in advance

Claire

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Try it as:

=if(getselectedcount([NHS Number])>0,
'Practice: ' &
concat(Distinct [GP Practice],', ',),

if(getselectedcount([Client Number] )>0,
'Practice: ' &
concat(Distinct [GP Practice],', ',),
'Please select NHS or Client Number'))

...which I think should work.

View solution in original post

6 Replies
alexandros17
Partner - Champion III
Partner - Champion III

It is strange it doesn't work, could you send an example doc?

gautik92
Specialist III
Specialist III

did yu try lik this

Anonymous
Not applicable
Author

Try it as:

=if(getselectedcount([NHS Number])>0,
'Practice: ' &
concat(Distinct [GP Practice],', ',),

if(getselectedcount([Client Number] )>0,
'Practice: ' &
concat(Distinct [GP Practice],', ',),
'Please select NHS or Client Number'))

...which I think should work.

Anonymous
Not applicable
Author

actually only ='GP Code: ' & concat(DISTINCT [Practice Code],', ') should work

you select 1 GP Code, only 1 code should be shown in TextBox

so it might be some other Settings?

Example from QV WhatsNewin QV11:='test ' &concat(DISTINCT Region,', ') 

Not applicable
Author

There are instances where a Patient/Client might be registered with more than 1 GP Practice in a year, so I need to be able to see all options, but only when NHS Number or Client Number is selected....

Not applicable
Author

This works perfectly, thank you!