# Problem with readRecords / updateRecord in Voting App

**URL:** <https://forum.code.org/t/problem-with-readrecords-updaterecord-in-voting-app/15212>\
**Category:** Unit and Lesson Discussion\
**Tags:** csp-unit-3\
**Created:** [March 23, 2018, 9:24am UTC](https://forum.code.org/t/problem-with-readrecords-updaterecord-in-voting-app/15212 "2018-03-23T09:24:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![c.dawson](https://avatars.discourse-cdn.com/v4/letter/c/c77e96/32.png) [@c.dawson](https://forum.code.org/u/c.dawson)\
**Post date:** [March 23, 2018, 9:24am UTC](https://forum.code.org/t/problem-with-readrecords-updaterecord-in-voting-app/15212/1 "2018-03-23T09:24:10Z")

</div>

I have developed a Voting App project for beginners university students using the readRecords / updateRecord function. The code I developed last year works fine:

> **[Check out what I made](https://studio.code.org/projects/applab/QhtoaCRS9Sp6m7s3HPBgIR0zU4dhTrgSWLvbJK9bAwc/view)**
>
> I wrote the code myself with Code.org

However, when the students, who first registered in the past 9 months, try it, it no longer works without bugs:

> **[Check out what I made](https://studio.code.org/projects/applab/u8PTQSRRPofp-D7HRX31KyxKNYuYP4QpAzbCQfgxcIA/view)**
>
> I wrote the code myself with Code.org

The above 2 sets of code are identical (but for variable names, IDs), the first code works but the second doesn’t.  
It seems App Lab have updated the readRecords / updateRecord functions in some way but in newer systems there are bugs. I urgently need to fix this for my students’ project - can anyone possibly advise as to what is happening and maybe suggest a simple workaround? Many thanks! 🙂

---

<div class="post-metadata">

**Author:** ![anmrobnott](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/anmrobnott/32/505_2.png) [@anmrobnott](https://forum.code.org/u/anmrobnott)\
**Post date:** [March 23, 2018, 12:48pm UTC](https://forum.code.org/t/problem-with-readrecords-updaterecord-in-voting-app/15212/2 "2018-03-23T12:48:42Z")

</div>

@c.dawson

The quickest way to get help with buggy behavior is to use the Report a Bug feature from the dropdown in the upper right corner of Applab.

I will also report it.

Hope that helps,  
Andrea

---

<div class="post-metadata">

**Author:** ![c.dawson](https://avatars.discourse-cdn.com/v4/letter/c/c77e96/32.png) [@c.dawson](https://forum.code.org/u/c.dawson)\
**Post date:** [March 23, 2018, 12:59pm UTC](https://forum.code.org/t/problem-with-readrecords-updaterecord-in-voting-app/15212/3 "2018-03-23T12:59:04Z")

</div>

Thanks Andrea,  
I have to say that was my first thought (and action!) but they sent me here…  
If you could report it too, that would be great, maybe they’ll pass it on to their engineers if enough people write to them about it…  
thanks again and regards, Chris

---

<div class="post-metadata">

**Author:** ![josh](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/josh/32/868_2.png) [@josh](https://forum.code.org/u/josh)\
**Post date:** [March 23, 2018, 4:05pm UTC](https://forum.code.org/t/problem-with-readrecords-updaterecord-in-voting-app/15212/4 "2018-03-23T16:05:59Z")

</div>

Looks like there are some typos causing the problems - compare lines 4 and 6 and lines 12 and 14.

---

<div class="post-metadata">

**Author:** ![c.dawson](https://avatars.discourse-cdn.com/v4/letter/c/c77e96/32.png) [@c.dawson](https://forum.code.org/u/c.dawson)\
**Post date:** [March 26, 2018, 9:24am UTC](https://forum.code.org/t/problem-with-readrecords-updaterecord-in-voting-app/15212/5 "2018-03-26T09:24:48Z")

</div>

Many thanks Josh,  
I’ve asked the student to update the column names, hopefully this will solve the issue! Will let you know how he gets on…  
regards,  
Chris

---

<div class="post-metadata">

**Author:** ![c.dawson](https://avatars.discourse-cdn.com/v4/letter/c/c77e96/32.png) [@c.dawson](https://forum.code.org/u/c.dawson)\
**Post date:** [March 28, 2018, 3:40pm UTC](https://forum.code.org/t/problem-with-readrecords-updaterecord-in-voting-app/15212/6 "2018-03-28T15:40:47Z")

</div>

This seems to have fixed it - many thanks Josh!  
regards, Chris
