Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

b_garside
Valued Contributor

show one record out of many in a text box

I was wondering if there is a way to cycle through records via variable and display it in a text box. Im using it for a form view with many text boxes showing various fields. But If can do it on one I can replicate it to the others.

This is the start of the expression. Not sure how to pull this off.

=If(CountryID=vCountryID,Concat(Country, '|') )

1 Solution

Accepted Solutions
Employee
Employee

Re: show one record out of many in a text box

Assuming that you have a variable vCountryID that contains country ID, you could do the following:

     =Concat(distinct If(CountryID='$(vCountryID)', Country), '|')

HIC

7 Replies
chiru_thota
Valued Contributor

Re: show one record out of many in a text box

Try this

=trim(SubField(concat(CountryName,',',8),',',1))

Employee
Employee

Re: show one record out of many in a text box

Assuming that you have a variable vCountryID that contains country ID, you could do the following:

     =Concat(distinct If(CountryID='$(vCountryID)', Country), '|')

HIC

kumarnatarajan
Valued Contributor

Re: show one record out of many in a text box

Hi,

Use Henric post it will work.

Else

try below

Concat({<CountryID={"$(vCountryID)"}>} distinct Country,'|')

b_garside
Valued Contributor

Re: show one record out of many in a text box

Thank you so much HIC !

Now the only thing to I need to do is set a Min/Max constraint on the variable so the user can page through without issue.

b_garside
Valued Contributor

Re: show one record out of many in a text box

How would I return the Max record ID in this String expression if the user chooses to go past it?

the last part wont work

=If(vCountryID < max(vCountryID) , '$(vCountryID)'+1 , max(CountryID)  )

b_garside
Valued Contributor

Re: show one record out of many in a text box

This is for a button using a variable action to increase the variable value.

b_garside
Valued Contributor

Re: show one record out of many in a text box

figured it out. Very much like set analysis.

=If(vCountryID < max(vCountryID) , '$(vCountryID)'+1 , $(=max(CountryID)) )

Community Browser