# Display slider value as starting point in the next routine/slider

**URL:** <https://discourse.psychopy.org/t/display-slider-value-as-starting-point-in-the-next-routine-slider/39696>\
**Category:** Builder\
**Tags:** slider\
**Created:** [April 18, 2024, 1:42pm UTC](https://discourse.psychopy.org/t/display-slider-value-as-starting-point-in-the-next-routine-slider/39696 "2024-04-18T13:42:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gianlois](https://avatars.discourse-cdn.com/v4/letter/g/6bbea6/32.png) [@gianlois](https://discourse.psychopy.org/u/gianlois)\
**Post date:** [April 18, 2024, 1:42pm UTC](https://discourse.psychopy.org/t/display-slider-value-as-starting-point-in-the-next-routine-slider/39696/1 "2024-04-18T13:42:24Z")

</div>

If this template helps then use it. If not then just delete and start from scratch.

**OS** (e.g. Mac):  
**PsychoPy version** (e.g. 2.3.x):  
**Standard Standalone? (y/n)** If not then what?:  
**What are you trying to achieve?:**  
I want to use participant’s rating in the first slider (prior belief) as a starting point in the second slider which measures posterior belief.  
**What did you try to make it work?:**  
First attempt: I used the “slider1.getRating()” variable or “$slider1.getRating()” in the starting value field of the slider component.  
Second attempt: I added a code component in the first slider and I created a variable slider1\_value =0 in the begin experiment (and begin routine) and I updated the value in the end routine slider1\_value = slider1.getRating. Then I used the slider1\_value variable in the starting value field of the slider component.  
**What specifically went wrong when you tried that?:**  
In both attempts, the marker was absent initially and appeared only after I clicked on the scale.

---

<div class="post-metadata">

**Author:** ![suelynnmah](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@suelynnmah](https://discourse.psychopy.org/u/suelynnmah)\
**Post date:** [April 19, 2024, 9:51am UTC](https://discourse.psychopy.org/t/display-slider-value-as-starting-point-in-the-next-routine-slider/39696/2 "2024-04-19T09:51:57Z")

</div>

[slider\_pos\_demo.psyexp](https://discourse.psychopy.org/uploads/short-url/4WmLJGiYAOwKF8W8tH2iafbTYVK.psyexp) (25.0 KB)  
Hi there, here’s a demo that should do the trick. I’ve used `.startValue` to present the marker and place a fixation cross between the two routines to distinguish between the pre and post sliders

---

<div class="post-metadata">

**Author:** ![gianlois](https://avatars.discourse-cdn.com/v4/letter/g/6bbea6/32.png) [@gianlois](https://discourse.psychopy.org/u/gianlois)\
**Post date:** [April 19, 2024, 10:50am UTC](https://discourse.psychopy.org/t/display-slider-value-as-starting-point-in-the-next-routine-slider/39696/3 "2024-04-19T10:50:46Z")

</div>

It works! Thanks a lot!  
I was not aware of the startValue function which is so useful.
