Update cloud variable list

Hi everyone,

i want to update a cloud variable keeping old data intact.

whenever some one buy a course. one more key pair should be added below course 5 containing value like purchased date and validity showed in course 2.
can anyone please help me

@germanydrivingschool, this is very easy, you have to just add object normally,
like lets suppose you have to add course X,
go to the block set cloud variable and give path to A\B\..\12\brought_courses\course X to Your object with Date and validity
By using this method, your other data will be safe, and not deleted.

thanks @ak_coder

i am not able to set the property. here are the blocks

can you guide me what am i doing wrong here.

Thanks @germanydrivingschool, for ss,
Ok, so after analyzing the code and result, i found that you have entered wrong path of object, and the set property __, in the blank space you have to fill your property name like date or validity.
If this not solved your problem, then please send more code screenshots or link.

Hi @ak_coder
thanks for your reply. i tried many ways

the firebase contains a list in the values are captured.

i have tried to have it like it can represent a list

uid. 0:get_properties object variable

when i execute set propery 1 of object. it creates a key value pair under the cloud variable.

may be if you tell me what should i have to mention in set property value that i can try

thanks for all the efforts

hi all, can any one please help me to know how can i update a nested cloud variable value in a list.

a block code how to update date or uid…

Try this:

Set cloud variable “premium_members[6]/bought_courses/course1/date” to “test”

Hi @tatiang

many thanks for the reply. i have tried both ways

with / and also with “.” but not working

I didn’t say to set the property of an object. Use the set cloud variable block at the bottom of the Variables drawer:

Screenshot 2023-07-20 at 12.05.31 AM

Replace “name” with the path that I provided above.

Be sure to back up your Firebase database before testing!

once again many thanks for your quick response

i tried to do as you have mentioned

but it didn’t work

and now its working.

i don’t know why its not considering it as a list.

i have created a list and updating cloud variable as a list insert at the end everytime i make a new entry of premium user

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.