This is a test sheet and super basic one too, but i’m still having this issue where if i add a data into group A using form button and submit, it adds the data below the non-empty row which is perfect. but when i add data to group b using a completely separate form, instead of glide adding the data below the non-empty row, it skips a row, and adds the data to the next row leaving one empty row in between. and it does the same thing if i add data to group B first and then group A. I’m attaching the link to the video of my screen recording to better explain my issue. Thank you in advance!
You’re still using an Add Form in both cases, so the behaviour you see is correct and expected.
For Group B, you should be using an Edit Form, not an Add Form.
At 1:35 in your video, get rid of that floating button.
Then what you need to do is tap on the bottom (last) item in the list.
This will take you to the details screen for that row.
Enable editing on that screen, and you can add your Group B values.
That should solve your immediate issue.
However, I would recommend rethinking the way you have your data laid out.
Instead of duplicating the column names, just have one group of columns and add one extra column to identify each row as either Group A or Group B. If you do it this way, you’ll find it much easier to work with in Glide as you move forwards.
Would you be able to provide an example of the last part about the layout? I’m pretty new to this so I still don’t quiet understand it yet. Thank you!
You are trying to treat a single table as if it’s two separate tables. Every time you add a row, you are adding a row to the entire table…regardless of which columns you choose to fill. When you add a row with only Group A values filled, you are essentially filling Group B values with blanks because they are in the same row. When you add Group B values, you are writing a new row with Group A values set to blank.
The first suggestion is to allow Group A to ADD a row. Then when you want to add Group B values, you need to EDIT that existing row instead adding a whole new row. However, this seems like bad design, unless for some reason you absolutely need Group A values and Group B values to be next to each other, if they are somehow related to each other.
@Darren_Murphy’s other suggestion, which seems a lot better to me, is to get rid of all the Group B columns altogether, then add a Group column that you can populate with a value such as A or B. The Group column will tell you if the values are part of group A or group B. In total, your table would only have 4 columns (Group, Date, Title, Description).
How do I create a column that populates either group A or B? Are you referring to create a column in glide or google sheets?
You just add a new column to the table. You can do that though the glide data editor or through the google sheet… As for populating that column, there are several ways to do that.
- You could have a choice component in your form where the user selects Group A or Group B.
- You could add a text entry component to the form and set the default value to Group A or Group B
- You could add a text entry component with a default value, just like above, but set the visibility on that component so it’s not visible and the user won’t be able to change it.
- You could create template columns in the parent table (where the form button is located), and populate that column with a group name, then in the form, pass that value through the form as a Column Value component.
- You could create template columns in the user profile table, just like above, and pass them through the form as User Profile Value components.
There’s a lot of ways to do it depending on if you want the user to choose a group name, or if you want it to be automatic depending on which form they enter.
So if I’m understanding this correctly, there’s no way to have group A and group B right next to each other and use the same row to add data other than the bad design option?
Yes, it’s possible. And you can make it work as I outlined in my earlier reply…
But the point that both Jeff & I are making is that it’s a poor approach in terms of database design. And is likely to cause you more problems further down the track. But if that’s the way you want to do it, by all means go ahead. It’s your App.
Maybe if you could provide a little more context that would help us understand why you believe you need to take this approach. What is the purpose of your App? How will it be used? What do Group A and Group B actually represent, and how do you intend to present the data in your App?
If you can help us understand the bigger picture, maybe we can show you a better way - one that will be more scalable and easier to manage and maintain.
Okay, cool. That helps a lot
I guess the first thing I would say that it is possible to do those charts in Glide. But that’s not what you want, so I’ll ignore that for now.
Given that you only want to use Glide for data entry, this is what I would suggest:
- Leave your sheet exactly as it is now, but pre-populate it with all the dates that you need (as you already have now).
- This way, Glide will see all rows (including the ones that only have dates), and instead of adding new rows via Glide, all you need to do is update the existing ones.
- In Glide, remove the Button Bar from your screen, and instead just show the Inline List. You can sort that by reverse sheet order so the newer rows appear at the top.
- For the Inline List details, you could use one of the Date columns, and then perhaps use a Template column to concatenate the two songs together. This would allow you to see at a glance what each person has entered without having to drill down into each list item.
- When you tap on each list item, the default action will be to show the details screen for that row (item). On this screen you can enable editing.
- Configure the edit screen as you need to. The important point here is that by using an Edit screen rather than an Add Form, you will be editing existing rows rather than adding new ones.
Thanks everyone for awesome support and guidance. I was able to find a workaround to resolve the issue and I’ll post it here so if anyone else has a similar issue, this is the workaround that works. I was able to create a script using appscript that sorts out cells based on columns so if there’s any blank spaces, it’ll automatically sort it out. this lets me keep the layout I have and also use the add form button on the glide app to add new data on the same row for two different group of columns.
Here’s the script I used:
function Sort() {
var spreadsheet = SpreadsheetApp.getActive();
spreadsheet.getRange(‘A:C’)
.sort({column: 1, ascending: true});
spreadsheet.getRange(‘E:G’)
.sort({column: 5, ascending: true});
};
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.