im sure i am missing something simple. can retrieve and iterate through the list (array?). but its breaking my brain trying to get the current cell value into a state, for later storage in the database. :firstitem gets me just that, :randomitem wont get me where i want to go. :item # might work if i can just figure out how to increment the counter. plz and ty
Thanks for posting an editor link, but you’ll need to change the permissions to “everyone can view” in order for anyone to take a look. Right now it just redirects to the homepage since it’s probably set to “private”.
Go to Settings -> General -> Application Rights = “Everyone can view”
Okay, you should be able to pull this off. I’m not sure which button you’re using to save the color as a state, but assuming it’s “save color”, here’s what I would do:
Step 1: Set the state
(This will save the color in RepeatingGroup’s custom state: zzzzzzzzzz)
When Button Save Color is clicked:
Set State (in Element actions menu): RepeatingGroup’s zzzzzzzzzz = (color you want - probably just reference the text element inside the cell)
Step 2: Reference the custom state to populate “Text Get From State”.
(This should be fine as is)
Set value of “Text Get From State” to RepeatingGroup Colors’s zzzzzzzzzzz.
if i select first item, thats all i ever get. the first item (red, in this example). if i dont select anything at this point, bubble gets mad and says im trying to show the whole list and not just a single record.
the buttons are in a sidenav. i can get the “current cell” option when im inside the rg. but outside is a nogo. im thinking there are some global/local scope things im bumping into. i suppose i could extend the rg all the way over to the left but thats gonna get messy. you can see im pulling from many different lists so if i do that im gonna have stuff everywhere.
add custom state to your RG, call it current of type number; this will be your counter
add On page load event and set this custom state to 1 (assuming your RG will have always minimum 1 thing on the list)
add button next and the following set of actions:
Show next of repeating group …
Set state of repeating group current = repeating group current + 1; Only when RG’s current < RG’s items count
if you need Previous button - there is action for it as well; do as above, just in the 2nd step do RG’s current = RG’s current - 1; Only when RG’s current > 1
Voila!
Add any button or anything you want outside of your RG and now you can refer to RG’s List of items : Item # (#=RG’s current) followed by the field you want to grab (text, color, image - whatever your RG’s thing contains). In the example above I did skip that step and I take data directly to text and input elements, because you can’t see my states.
that did it! i knew there had to be a counter involved in there somewhere i just couldnt figure out how do that in a way made sense. thanks for the save!