Firebase realtime database - rules

I would like to know if it would be possible to use a specific value from the saved data to write and change the value of other saved data

For example:

create a “rule” where it says that if the value of data “X” is equal to 1, changes can be made to data “Y” saved

??

rules is not there

BUt you can try like this

While you try to save data, first get data from teh consern tag, then check the value,

If the value is 1 
then save the data 
else just alert the user that changes can not be made
1 Like

could you send me a print as an example? please