Slider that returns the number of "items" found

Hello

I have a slider that the user will be able to move between those values: 0 to 1000. With the max value always set to 1000.
I am currently displaying the value of the position of the handle along the slider as the user slides it and that works fine. But I would also like to display the number of “items” found between the selected values. This should be done dynamically.

For example if the handle is on 350 it might return the following items found: 104.

Any help would be appreciated,
Many thanks,
Diane

What is the relationship of slider position to number of items? If there are 104 items between 0 and 350, are there 208 items between 0 and 700? If so, just calculate with something like [[ (LVAR1.x-LVAR2.x) * 0.297)]] where LVAR1 is your slider position or handle and LVAR2 is your slider trough/limiter, such that LVAR1.x-LVAR2.x = 350.

Or is the distribution of items random? What is an “item” and how is it defined? Is an item an actual widget?
Maybe you could post an .rp file to better demonstrate your setup.

Thanks for your reply, unfortunately i can’t upload a rp file as it is part of a wider prototype with sensitive data but here is a visual representation of what i am trying to achieve:

0 to 1000 is the scale of the slider.
A is the current position of the handle on the slider.
The distance between A and 1000 is a range which will return a value (X)

The smaller the range, the smaller the value of X will be.
So for example if A = 150, X might equals to 350
And if A = 800, X might be equals to 12

I am trying to dynamically return the value of X as the user moves the slider.

Hope this explanation makes a bit more sense,

Thanks again,
Diane

To update the callout widget with text, “Showing X items” when you drag the slider widget (“A”), you’ll need to ensure that it is in a dynamic panel–sounds like that is already the case if user is able to move it, using the OnDrag event. In OnDrag, add an action for "Set text on CalloutWidget equal to “Showing [[ItemNumVariable]] items” " where ItemNumVariable is some global or local variable pointing to the value for how many items there are.

You can either calculate that “ItemNumVariable” value separately, or in the “local variable function” for the Set Text action; click the “fx” button to far right of the value input field to access it. See my previous reply for an example of this:

Here is a quick example:
Slider set text.rp (54.5 KB)

That’s great thanks mbc66!

Diane