I am trying to create a simple app that loads a random picture of a motorcycle into a container. The container is called Bikebox. The container’s associated object is a Bike. The Bike has a picture that is uploaded.
When the user clicks the “edit me” button, it is supposed to select from one of the bikes in the database (there are only 4 right now). Instead, when I click the button, it reloads with nothing, and then when I look at my data the space where the bike was is empty. What gives?
Your workflow is doing the wrong thing. You have it trying to change a record in the database. By saying “Make changes to bike” and making the thing to change be “Group Bikebox’s Bike” it is saying "whatever database record is associated with the group Bikebox right now, I want to update the Picture.
What you want to do instead of using the “Make changes to a thing” action is use the Element Actions/Group/Display Data action and choose the Bikebox group as the element and in the Data to display field put Search for Bikes:random item. That will associate a random database record with the group Bikebox and then the Parent Group’s Bike’s Picture reference in the image will work right.
What Marc said.
In other words, you have a list of all the possible images stored in your database so you don’t need to touch them, you just want the image on the screen to change.
The databases are where you store data, on the screen/in workflows is where you change what the User views.
One of the ways as Marc mentioned is to do: When Button clicked > Display List > Search for Bikes: random item.