Error Creating a Record

csp-unit-post-ap

#1

I’m playing with files and I have an error when creating a record.

My Project: https://studio.code.org/projects/applab/XUdEnQAvUwtxyNpU61ssbj1rkypewIi1h2b6iwOH8qI/edit
My error:

Can anyone help? or point me at some more comprehensive documentation on the createRecord function than you have on the site?

Thanks! - Ellen


#2

Did you look at this documentation?

https://docs.code.org/applab/updateRecord/


#3

I did, but it wasn’t very comprehensive. My code was an attempt to mimic the example, and I need more detailed information about the syntax in order to correct the error.


#4

So…I am absolutely NOT an expert, but this “worked”. I added an additional var on line 3: mostRecentId=1, and two lines to getScrData (now line 80 infractionData.id=mostRecentId; and mostRecentId ++).

I think that you have to explicitly give your record an id field and I think that you need to update the value of mostRecentId so that you aren’t saving all records to the same place. That said, I strongly suspect that mostRecentId++ is the wrong choice–I feel like this won’t put all of a single student’s info into the same searchable location?


#5

This gave me a bunch of errors.


#6

@esatter1 - The code.org folks took a preliminary look and the app appears to working correctly. They may need access to your data set to help debug this. They ask that you send email to support@code.org with as much info as possible so they can start a dialog with you to debug this privately.


#7

thanks! I will! ________