Possible to update a row?

Hi just wondering of it is possible to update a row to overwrite the value in the field?

I have a number in a master table that I would like to increase by one each time a new user saves their name to a separate table.

This allows an admin to have a master story line lesson open on a whiteboard where they can see a live count of the amount of students who have started a lesson on their mobile phone in the classroom.

I have it working but it will add a new row with the number value 1 instead of incrementing the existing row.

Any help greatly appreciated!

October 10, 2019, 7:57 am

Click for thumbs down.0Click for thumbs up.0#1

You can use the function CloudMeta('rows','somevar'); to get the number of rows the table currently contains. Just replace somevar with the name of a variable you will use. Upon function execution, the variable will contain the number of records currently in the table.

Note that this function is in beta testing. You shouldn't run into any issues, but if you do, please post them here so that they can be addressed.

October 10, 2019, 1:31 pm

Click for thumbs down.0Click for thumbs up.1#2

Thanks @cluelabssupport for the quick reply.

That worked perfectly, thanks. Is there anywhere online where developers can see a list of functions available to use?

Many thanks for your help, awesome tool you guys have created!

October 11, 2019, 2:45 am

Click for thumbs down.0Click for thumbs up.0#3

Stephen, once the CloudMeta function is approved, it will be listed on the "How to use..." page. Currently, "rows" is the only option available to the public. If you have a suggestion for another useful option, feel free to post here. Now is a good time to provide suggestions while the feature is being worked on. Thank you!

October 11, 2019, 9:09 am

Click for thumbs down.0Click for thumbs up.1#4

To overwrite a value based on the row ID would be extremely useful!

I am actually stuck on this now and can't use the widget as hoped, Is there any way to do this currently?

Thanks guys!

October 15, 2019, 6:03 am

Click for thumbs down.0Click for thumbs up.0#5

While we recognize that it would be useful to update the rows based on record ID, that would also mean that each user can potentially have access to other people's records, which we don't think is appropriate. The users are recognized by a unique token (stored in a variableĀ stencilusertoken). If you resume the module and the value is not blank, then the user can overwrite/update their saved records. Otherwise, if there's no token, a new record is created. Potentially, there are multiple ways to save and reuse the token (e.g. through cookies, URL parameter, hard-coded value, etc.).

Additionally, If you have ideas on how to implement data overwriting and/or returning user authentication without compromising other users' data, feel free to suggest.

October 15, 2019, 8:57 am

Click for thumbs down.0Click for thumbs up.2#6

Hi, I'm new to Cluelabs and think what you've done is fantastic - just thought I would add my 2 pence that it would be a great feature to be able to show and/or overwrite the data of a specific row, regardless of the user. I think as an admin of the learner's data and of the course it should be up to the developer to allow/deny this by what is provided in Storyline, especially as the data can be very vague (i.e. first name and their score).

I'm trying to implement a 'recent achievements' slide that shows the achievements that other learners have recently gained. The slide would display learner names of those that have a 'true' next to a certain achievement in the Data cloud, but I can't think of a way of doing this without being able to access other learner's data.

thanks and great work!

January 7, 2020, 8:51 am

Click for thumbs down.0Click for thumbs up.1#7

Hi Luke. Thank you for your kind words. It was certainly considered to allow learners to access other people's data, but it seemed like too much of a risk since some people could be saving information that is more sensitive than just a module score. So there are no plans to add this feature at this time. However, your recent achievements idea sounds very interesting. If this is something that your organization wants to implement, consider requesting a premium widget that will pull the needed data from the data table you set. https://cluelabs.com/stencil/widget-premium You have an idea for an interesting feature, and it seems like something that's easy to build. Note that as a premium widget, only you will have it, so that'll allow you (your organization) to develop something others can't.

January 7, 2020, 9:30 am

Click for thumbs down.0Click for thumbs up.1#8