# Update slider labels in every trial

**URL:** <https://discourse.psychopy.org/t/update-slider-labels-in-every-trial/30678>\
**Category:** Builder\
**Created:** [September 2, 2022, 6:18pm UTC](https://discourse.psychopy.org/t/update-slider-labels-in-every-trial/30678 "2022-09-02T18:18:28Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![felipeviegas](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/felipeviegas/32/4793_2.png) [@felipeviegas](https://discourse.psychopy.org/u/felipeviegas)\
**Post date:** [September 2, 2022, 6:18pm UTC](https://discourse.psychopy.org/t/update-slider-labels-in-every-trial/30678/1 "2022-09-02T18:18:28Z")

</div>

Hello guys,

I am using the latest version of Psychopy on Windows 10. I just want to know if it is possible to update labels at every repeat (every trial) of a task. There is the $ sign on the labels field of the slider, but no selection box to change it from “constant” to “set every repeat” as can be done for size or position. I tried to use a sheet column to update the labels, but the column name won’t be recognized by the label field.

If anyone would give me alternative solutions, I am implementing a Ishihara test with Psychopy and I would like to update five possible responses (numbers of the plates) on each trial. No problems setting up the components, including a slider for responses and the plate image, but I could not update the labels on every trial.

Of course I could create five text components and update each one, but couldn’t it be done directly with the labels?

Thanks for the help!

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [November 14, 2022, 10:41pm UTC](https://discourse.psychopy.org/t/update-slider-labels-in-every-trial/30678/2 "2022-11-14T22:41:27Z")

</div>

This thread might help.

> [@How to set slider values to variable from .xlsx?](https://discourse.psychopy.org/t/how-to-set-slider-values-to-variable-from-xlsx/21894/8):
>
> Setting labels after initialisation is difficult, but not impossible! If you have the same number of labels each time, you could do this: # Get labels list for this routine labels = efflabels.split(",") # For each label... for i, obj in enumerate(mySlider.labelObjs): # ...set its text to be the corresponding value in labels, and store this in the slider obj.text = mySlider.labels[i] = labels[i] (the initial value of labels would need to be the same number of values as in efflabels sepa…

---

<div class="post-metadata">

**Author:** ![felipeviegas](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/felipeviegas/32/4793_2.png) [@felipeviegas](https://discourse.psychopy.org/u/felipeviegas)\
**Post date:** [November 20, 2022, 4:07pm UTC](https://discourse.psychopy.org/t/update-slider-labels-in-every-trial/30678/3 "2022-11-20T16:07:28Z")

</div>

Hello, thanks for your answer. I solved it “manually”, defining a text component for each position and leaving the text as variables on the stimuli file (xlsx). But I’ll look into this solution also!  
Regards.

---

<div class="post-metadata">

**Author:** ![Becca](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/becca/32/34260_2.png) [@Becca](https://discourse.psychopy.org/u/Becca)\
**Post date:** [November 20, 2022, 5:16pm UTC](https://discourse.psychopy.org/t/update-slider-labels-in-every-trial/30678/4 "2022-11-20T17:16:44Z")

</div>

Hi There,

Yes sorry this is a known issue and the dev team are working on a fix for the next release. For now your manual solution is indeed what I would suggest.

Becca

---

<div class="post-metadata">

**Author:** ![felipeviegas](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/felipeviegas/32/4793_2.png) [@felipeviegas](https://discourse.psychopy.org/u/felipeviegas)\
**Post date:** [November 20, 2022, 5:41pm UTC](https://discourse.psychopy.org/t/update-slider-labels-in-every-trial/30678/5 "2022-11-20T17:41:24Z")

</div>

Ah, thanks a lot for the update, Becca!

My protocol, in the end, turn out great! It is a loop for the AUDIT scale, that has specific answers for almost each one of the ten questions in the scale. I used your tip for the pop up button! Thanks for the youtube videos and keep them coming!

Regards!

---

<div class="post-metadata">

**Author:** ![platypusfetus](https://avatars.discourse-cdn.com/v4/letter/p/ac8455/32.png) [@platypusfetus](https://discourse.psychopy.org/u/platypusfetus)\
**Post date:** [February 8, 2024, 9:14am UTC](https://discourse.psychopy.org/t/update-slider-labels-in-every-trial/30678/6 "2024-02-08T09:14:46Z")

</div>

Hello!  
I’m interested in knowing how you solved the issue

> [@Update slider labels in every trial](https://discourse.psychopy.org/t/update-slider-labels-in-every-trial/30678/2):
>
> This thread might help.

I’m facing a similar one myself where i want the slider labels to change every repeat like in a conditions xslx but i have no clue whatsoever (cannot even find the setting where labels change every repeat) Could i please know how you did it ?

Many thanks.

---

<div class="post-metadata">

**Author:** ![felipeviegas](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/felipeviegas/32/4793_2.png) [@felipeviegas](https://discourse.psychopy.org/u/felipeviegas)\
**Post date:** [February 8, 2024, 9:08pm UTC](https://discourse.psychopy.org/t/update-slider-labels-in-every-trial/30678/7 "2024-02-08T21:08:21Z")

</div>

Hi platypusfetus (interesting name! haha),

I am sorry to tell you that there is no miracle solution. By manual, I mean that I had to put a text component to every possible answer of my likert scale and, for each of these components, I had a variable in the excel file.

 ![Audit](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/2/b/2b18de0cef4b6b67f297c78bda26a17c17be8295.jpeg)

So, each one of these Audit components (1 to 5) is a variable text that I can “set to every repeat” and I manually aligned these to the Slider of the routine. It works great after everything is in place.

And the slider I just left with no labels. I would love to show you this, but as always, one of the recent updates from Psychopy changed how the software referenced/call/deal (idk) things and this particular experiment isn’t running anymore. I am sorry I cannot debug it right now to print screens. This routine composition screen should help, though!

Regards.

Felipe

---

<div class="post-metadata">

**Author:** ![platypusfetus](https://avatars.discourse-cdn.com/v4/letter/p/ac8455/32.png) [@platypusfetus](https://discourse.psychopy.org/u/platypusfetus)\
**Post date:** [February 16, 2024, 7:11am UTC](https://discourse.psychopy.org/t/update-slider-labels-in-every-trial/30678/8 "2024-02-16T07:11:53Z")

</div>

thanks for that pic !  
I’ve set it up so that it more or less works the same (with text components and mouse clicks instead)

Many thanks,  
Platypusfetus
