Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

mhmmd_srf
Contributor II

Next and Prev button to nevigate different Item

Hi All,

Hope you are doing well.

I have a requirement like in Straight Table I need to show Sales By Items. Each time it will show only one Item.

By default it will show for the least Item no. We will have two buttons NEXT and PREV. Once user will click Next button, chart will show for next item and when user will click Prev button, chart will show sales for previous Item.

Could you please help me to design that. I could not found any suitable Action / Button for this.

I am attaching the sample QVW here.

 

Thanks,

Sarif

Labels (1)
1 Solution

Accepted Solutions
MVP
MVP

Re: Next and Prev button to nevigate different Item

Hi Sarif,

I could not open your app; created a sample from my side and tried a solution. PFA and let me know how it goes.

13 Replies
Partner
Partner

Re: Next and Prev button to nevigate different Item

Hi Sarif,

Why don't you use native Cyclic group functionality? put all required fields into the group and use this group as a dimension for your chart(s) - it would be more "natural" solution for QlikView rather than using buttons and actions.

However, if you really want to implement this "button" approach, you would need to create a separate satellite table like:

Index, DimensionName

1, Dim1

2, Dim2

....

In actions you would need to change variable from 1 to max (whatever number you have), and in chart you would need to use an expression as a dimension:

=$(only({<Index={$(=YourVariable)}>} DimensionName))

But again, it's not recommended approach from application performance point of view.

Hope this helps.

//Andrei

mhmmd_srf
Contributor II

Re: Next and Prev button to nevigate different Item

Hi Andrei,

For Cyclic group we can handle multiple fields. However we need to implement this for Only Item Number.

For every click, chart will move to next Item Number. So any way I think we need to do this using Button.

Could you please guide me how to implement do this. How we will create this index.

I think the satellite table should have Index and Item No.

Please guide.

Thanks,

Sarif

Partner
Partner

Re: Next and Prev button to nevigate different Item

Hi Sarif,

Now I understood your requirements better, so please find attached the example.

NOTE: I'm using inter-record function (Fieldvalue) and the order of values is the same as they were loaded into Qlik data model (in script), make sure to sort them accordingly beforehand.

Hope this helps.

//Andrei

mhmmd_srf
Contributor II

Re: Next and Prev button to nevigate different Item

Thanks Andrei.

This is what I am looking for.

But one thing. In this case the selection is not working. If I select any Item, the chart is not changing. It changing only when we are clicking Next or Prev button.

Please suggest.

Thanks,

Sarif

Partner
Partner

Re: Next and Prev button to nevigate different Item

Hi Sarif,

FieldValue() function will not allow you to make selections (at least easily)...

You can try load data island table with distinct ItemNumber values and Index column (1,2...) and the rest pretty much similar to existing solution, so you would be able to use Next/Prev buttons.

To be able to select something, I'd recommend to use Alternate state and Always One selected value as in attached example.

Hope this helps.

//Andrei

MVP
MVP

Re: Next and Prev button to nevigate different Item

Hi Sarif,

I could not open your app; created a sample from my side and tried a solution. PFA and let me know how it goes.

mhmmd_srf
Contributor II

Re: Next and Prev button to nevigate different Item

Thanks TB. But I cant see any data in the Straight Table, where u have used the expression.

Sarif

MVP
MVP

Re: Next and Prev button to nevigate different Item

Is not this (below) visible to you?

Capture.PNG

mhmmd_srf
Contributor II

Re: Next and Prev button to nevigate different Item

No I can see like this.