Trying to populate a table with a grouping from other table

Hi good community,

I am trying to populate a data type 1 with a query from a type 2.

Lets say data type 1 has only 2 columns: User, Number of logins
While data type 2 has the information of every login of the user.

To populate type 1, I run a “do a search for type 2 grouped by: User with aggregation [count]” and I get what I need, but since it is a grouping Bubble won’t let me copy/paste the results in type 1.

As you can see type 1 is a grouping of type2 that I need to store in a separate table.

I need this action to be performed when a user clicks on some button. Any clues?


Nobody can help me?

The value of data type 1’s number of logins should be Do a search for data type 2 where User = This data type 1’s user. The real question is why aren’t you just storing number of logins on the user?

No I don’t think that’s the solution, because I need to sum the logins for each user. Ok so this is an example so you can understand my problem easily. I know in this case i can just update number of logins, by making the value “number of logins+1” in every login the user does.

But my problem is with a much more complex table, with many columns and I need to do a search by…grouped by…some fields and this result i want to store in the other table. Hope this clarifies my question.

The value of this grouping’s aggregation is likely to be always 1. It’s just the number of data type 1 with this user as it’s User.

I don’t really understand it… if you give us context someone might be able to help because the chances are you’re approaching the problem wrong.

Ok thanks, I 'll elaborate better then with real data.

Ok Ill try to explain my problem better this time

I have a RG that is grouping some data:

The result is shown on the next picture:

I need to copy those results in a table that has the following columns:
Captura de pantalla 2023-12-14 120330
Where “Período” is the current week. And “partidas” is the same as “cantidad”.

I can’t do it on a workflow to create new things, because since it is a grouping It won´t allow me.

The point of this is to store the data of the grouped table for every period, because my app deletes the table at the start of every period to avoid storing garbage. I want to have a KPI so I can check tendencies and evolution of my numbers,

Hope this time you understand my problem @georgecollier