Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need to display the last 10 results in the list box(when list box contains more than 10 values).
| 201211 |
| 201212 |
| 201301 |
| 201302 |
| 201303 |
| 201304 |
| 201305 |
| 201306 |
| 201307 |
| 201308 |
| 201309 |
| 201310 |
| 201311 |
| 201312 |
| 201401 |
| 201402 |
from the above list i want to display the last 10 values.
Can some one help.
Regards,
rajesh
List box: expression: something like:
Aggr( If( rank(YourField)<11, YourField), YourField)
You can do it loading 10 last values on script, List Box cannot limit the values.
If the date values are consecutive, you can do something like this in a expression:
IF(Date >= Max(Date)-10,Date). Do not forget hide null values.
Hi Rajesh,
Try this
Aggr(only({$<Date={"$(=Max(Date)-10)"}>}Date),Date)
hi tresesco,
But when i have selected any value from the result set(one value from 10 values in list box), the remaining values are going hidden.
and i want it to display even after selection of any value.
Regards,
Rajesh
True, it would be so, because the calculation depends on the selection. Alternative could be, something like: create a variable in the script that holds the 10th max value and use that variable(which doesn't change on selection in the condition).
Load
Max(YourField, 10) as Max
from <>;
Let v10thMax = Peek('Max');
Now, list box expression: =If( YourField>= v10thMax, YourField)
PFA
Hey, got another idea for front end as well !
Define variable in the front end like: Variable1= Max({1}Field, 10)
PFA
hi tresesco,
the above list box expression is not correct, i am getting the error.
Can you have a look.
Regards,
Rajesh
Have you checked my second attachment?
Variable1=Max({1} Field , 10)
=If(Field>=Variable1,Field) // list box expression
Edit: Variable definition corrected.
hey tresesco,
Tried again and it is not coming.
could you please do an attachment if possible.
thanks in advance.
regards,
rajesh