Forum Documentation Showcase Pricing Learn more

Custom State for current cell of repeating group

Hi

I currently have a repeating group that has been set up to enable drag and drop functionality. I have been able to get the drag and drop parts working fine. I have the database set up to hold the sort order and after extensive testing everything is working fine.

My problem lies in the fact that I have a drop down input in the repeating group. This input is set by the user and then has a custom state that is set to the same value selected. The issues that have arisen are that when I drag and drop other text elements in the repeating group the drop down input value gets changed.

I have tried multiple approaches and using custom states is getting me closer to my end result. Essentially I am trying to get the “time”, which is the values of the drop down input, to remain the same after the text elements have been moved around using drag and drop. I would like to basically “lock” the time value to the sort order of the repeating group data fields.

My conclusion is that if I am able to figure a way to set a custom state onto a current cell in the repeating group that I would then be able to save successfully in the database the correct “time” for each data field. I had already attempted to set custom states onto the drag and drop group and the drop area but when saving to the database all data fields have the same time since they are referencing the drag and drop group or drop area last manipulated.

Anybody know how to set a custom state onto a current cell in a repeating group?

I see that you got no response. Hopefully you got your answer another way.

I’m having a different problem with custom states in repeating group cells. but . . .

in your case,

I think the most realistic answer is to enable auto-binding on the dropdown time element. That way the database thing is updated immediately and when the thing is dragged to another cell, it already has the right time and will appear in the cell’s dropdown.

I hope that addressed your challenge.

Thanks for the reply. I have since figured this out. I forget exactly what it was that I had done, but I think your suggestion was something I explored. I believe the issue with that was when dragged to another cell, the drag and then dropped caused the times to get mixed up.

I believe I ended up using a strategy incorporating custom states and the current cell’s index to associate with a sort order of a particular cell. I think I had to save to a current state the information and use the numbers of current cell index and sort order to match data fields to them.

I’m not really sure what I had finally done.

What is the issue you are having with custom states in repeating group cells?

Like you, I don’t recall precisely what it was (or is.) I have such a list of minor issues with my app I sometimes feel like a pinball, bouncing from one thing to another and losing track of where I’ve been. :smirk:

It didn’t involve drag-drop. I keep those as simple as I possibly can.

It had something to do with a checkbox icon, using custom state to determine its image, sometimes holding the appearance that belonged to the row that was deleted from the list when the checkbox was clicked.

A lot of what is annoying to me, the testers don’t even notice, so I prioritize my fixes based on data integrity more than UI appearance. I think I still have some repeating groups with custom state issues that don’t look good but don’t affect the data.

Back to the old grindstone.

@laurence… I’m loving your pinball analogy! :slight_smile:

1 Like

Hi there! How did you exactly do this? This is interesting and I need this badly, but the implementation sounds very complex - especially for a high number of items.

Hi Olli

Yes the implementation is very complex, so much so that I don’t remember exactly every step I did, and don’t have the time to sort through the apps to find which one it was that I had to do this on, or which page or get into the nitty gritty of the workflows to find out exactly the approach.

As mentioned earlier I am not sure exactly what I had done to accomplish it, but from memory it took a lot of custom states being set. It also required a workflow to save details in the database with references to the repeating groups current cells index. The index is a number, basically representing which cell it is in order.

So for my purposes of getting times attached to an event that a user is creating and then seeing in a repeating group. When they later wish to change the order of the events using drag and drop, but keep the time the same, it required a lot of references to the current cells index, a custom state set to sort orders. It took me a long time to get it sorted, probably close to 120 hours, but I eventually got it to do what I needed.

Sorry I couldn’t give you a straight forward guide to how to solve the problem, as I am not sure really what it is you need, how far along you are in the process of solving it, or what you have attempted as of yet. Also, not sure if you have drag and drop figured out.

Provide more details of your current situation, what you want to do, and I could potentially be of more help.

Thanks for your reply! This actually helped a lot. Because if this step needs database, it completely undermines what I’m trying to do, which is to avoid using the database in the first place :slight_smile:

I’m not working on drag and drop but a voting, sorting, and filtering system that I have made much faster by downloading and manipulating the data in custom states. However, the last obstacle is the indexing - can’t see a way through yet.

use the matching of custom states number value to the current cells index value if you are using repeating groups.

Also, use workflows to set custom states based off of conditionals when information in another custom state changes. You can set workflow events to trigger when a condition is true.

But when you talk about a last obstacle of indexing, are you referring to putting the sorted and filtered votes into some kind of category or grouping?

Are you trying to get the information saved to D.B. or just be used in another custom state?

If you are trying to categories or group the sorted and filtered votes you would create a custom state that is a list of things ( ie: votes that match to the sort and filter criteria ) Then use a workflow to set the states, be sure to add list of the items.

Another technique is not to download the information from the D.B. but to save it to the database and then use it to be added to a custom state in the workflows by referencing the step number in the value section; ( ie: value = result of step 2 create new vote )

From there you have the information that was just saved to the D.B. automatically and I believe without much time delay, as a custom state and be able to link to the info for all kinds of workflows and functionality on the page. For example, if I had a vote that was for President A from a student who was 18 in the City of Big City at a polling station of number 4568; I would be able to have access to all of the information in a custom state on the page to use as much as I want, without ever needing to download the information itself through a search of the D.B.

Custom states are great…they are truly inspiring once you play around with them and see all the different ways to use them. Really helps to creatively get over hurdles.

If you put some screen shots or make the editor available to view and give some more specifics to the issue and what you are trying to accomplish, I could take a look at it in the next couple of days.

I have had so many issues that I get held up on, to just have somebody else point out what was obvious to them. I’ve also had lots of luck in just stopping and returning the next day with fresh ideas after sleeping on it. Most of my breakthroughs take place first thing. Rarely do I solve the issues of the day at the end of my night, so taking breaks from problem causing issues helps.