I have spent the last week making a photo tagger. I have a hotel listing site and wanted to allow the property manager to tag the different photos.
All things work as hoped except for two functions. The one I am focused on at the moment is allowing a user to delete an item from a list of items as a data field from the current data type in a repeating group.
This is what I have going on:
Firstly, I have in the database a Data Type of Photos with a Data Field Room ID which is a list of texts. ( I might want to change this to be a list of Property Rooms, which is a Data Type that has a Data Field of Room ID ).
Also in the database is a Data Type of Property Photos:
Another Data Type of Room Photos:
As well as a Data Type of Property Rooms:
Then on the page I have the following setup to display this information (currently I have more than what I will ultimately, but this is for testing purposes)
This is displaying all photos in the Data Type of Property Photos:
Next I have displayed the photo list of each property room:
What I am doing for functionality is to allow a user to click the trash icon in the cell of the photo in the property room to open a popup that gives them 4 options of deleting the photo. One option is to delete it from the current room (the room the photo displayed in the repeating group on page, the one they clicked the trash icon from).
A second option is delete the photo from all rooms it is listed on. This works fine. A third option is delete the room from the Property Photos list which also works fine. The last option is to delete the photo entirely, which also works fine.
So, the problem is getting the photo to be deleted from the room which is displayed in the repeating group containing the trash icon they clicked. This is an issue because each photo has a list of room ID’s and not just one. So, when trying to reference the room ID of the repeating group containing the clicked trash icon I can not.
I’ve tried to do custom states, but can’t find a way to set a custom state that is equal to the Room ID of the room displayed in the repeating group.
I have successfully allowed the user to delete a room from a single room in another popup which is the Photo Tagger popup. This was successful because the function runs a checkbox input value being changed, and the checkbox is in a repeating group of Property Rooms, so I was able to reference current cell’s property room.
I know it is not a necessary function for the user, but I am hard headed and want the app to do what I want it to do. Really hoping somebody might have a work around for this.
This is a link to my app for viewing:
If you want to view it as a user would and see the functionality you would want to follow this link: