See image below for a visual representation. Currently when I hit the blue + symbol I have an empty set of inputs appearing. That being said, my inputs always appear at the bottom of the list.
I have tried to play around with the sorting function available on repeating group settings and also with storing a number in a custom state and attempting to increment it every time a new item is added but not too sure how to base the sorting of the RG on this custom state.
Any help in figuring out how to add items “inline” would be greatly appreciated! Thanks!
I don’t understand what is exactly your problem but if new entry appears at the bootom of RG that’s because the sorting is equal to descending: no. Change by yes to display items from newest to oldest.
Appreciate the advice @mickceb but yes you definitely misunderstood. I can explain in greater detail, perhaps my original post was somewhat vague.
My RG has the “+” icon present in every row as seen in the example image. Lets imagine I have a RG displaying numbers 1 through 5. My RG would look something like this “1, 2, 3, 4, 5”. Now lets say I click the “+” icon in row 2, this should then add a new row below 2 and every row below 2 should be shifted down one to accommodate the new item added into row 3’s old position.
Hopefully this makes more sense, I do think I may have figured out a way to do this myself but have yet to implement or test my logic. It involves the use of the free and popular list shifter plugin but I may be making things more complicated then required and if anyone was aware of an easier method of achieving this functionality would be greatly appreciated.
@coty thanks for explains.
Until now I don’t see how to do because I think your need involves a data structure different from that implemented in bubble. But maybe there is a trick to found with custom states.
If I find out a solution I’ll let you know.
While your solution did point me in the right direction I have run into trouble properly applying it to my use case and was wondering if you possibly had a way to accomplish this, let me explain…
Has seen in my image below I am using this table that will display a list of “users” however I want to allow the user to add to this table via the “+” icon. This icon will add a new row of inputs where the user can then select a user from the dropdown. The problem I am having is I am not able to find any way possible to sort data that is not linked to a “thing” in the database.
I can add to the table by creating a new user, displaying the list plus item which is the result of step 1’s new user and then delete the user after. These steps would be repeated every time the + symbol is selected and using this I have been able to get a new set of inputs to appear but cant find any way to sort them.
If you knew how to do this would be great,
Thanks!
@coty it’s really hard for me to understand the data structure; so the repeating list is actually of type “User” not another datatype related to it? it looks to me like it’s a list of order of items and each item is related to a user (supervisor). How can a row of a RG not be related to a thing when the RG itself is of type user ?
and to a dd another input field, you create and delete the user? how does the row stay?
@hanan1 , I viewed your solution a few days ago but can’t remember the specifics of the condition you used to +1 to only the items in the RG that are > current index. would it be possible to open up access to your sample again or post a screen shot of the condition? I’m unsure how to get the WF to evaluate each item in the RG.
Thanks!
Very elegant solution BTW of what I remember
to answer your question; I added a number property (order) to each row in the RG and when the plus button is clicked in a certain row, all RG items with order>current row’s order is increased by 1 (bumped down the list to make room for a new row) and a new row is added with the current row’s order+ 1