AnsweredAssumed Answered

Horizontal portal

Question asked by MikaelSandberg on May 20, 2012
Latest reply on May 30, 2012 by MikaelSandberg

Title

Horizontal portal

Post

I using Comment's example posted here, to create a horizontal portal to show products. My table contains all the products and I am trying to filter the portal based on department code. My issue is that the scrolling only works for the the products that belong to department code 210, since my table is sorted on department code. But when I trying to display products with department code 220 I only see the first 6 items and the scrolling does not work.

This is the code I use to filter the portal:

PF OITM Items 2::U_Dept = $$Dept
and
Let ( [
groupSize = 6 ;

indexValues = List ( PF OITM Items 2::ItemCode ) ;
index = ValueCount ( Left ( indexValues ; Position ( ¶ & indexValues & ¶ ; ¶ & PF OITM Items 2::ItemCode & ¶ ; 1 ; 1 ) ) )
] ;
Div ( index - 1 ; groupSize) ≥ $$group[1]
)

And this is the script I use to do the scrolling:

Set Variable($$group; Value:Let ( [ groupSize = 6 ; group = $$group[1] + Get (ScriptParameter) ; limit = Div ( $$count - 1 ;    groupSize ) ] ; Max ( 0 ; Min ( group ; limit ) ) )

Refresh Window [Flush cached join results]

Outcomes