Hello.
I have a code to let my SignupID go +1 for each new item added.
Currently i am trying to implement it so I have my MainID and my SignupID.
Currently SignupID follows the code below
Patch(
Deltagerliste;
Defaults(Deltagerliste);
{
SignupID: Text(
Value(
First(
Sort(
Deltagerliste;
Value(SignupID);
Descending
)
).SignupID
)+1
);
Titel: Label1_3.Text;
MainIDSignup: Label24.Text;
Brugernavn: User().FullName;
Deltager: "1";
PlusOne: If(
Checkbox1.Visible;
(If(
Checkbox1.Value = true;
Text("1");
Text("0")
));
Text("0")
);PlusKids: If(
Dropdown1.Visible;
Dropdown1.SelectedText.Value;Text("0"))
}
)
(and works)
Now I wish to tweak the code so that it always follows the number it reached according to MainID.
For instance
| MainID | SignupID |
| 1 | 1 |
| 1 | 2 |
| 1 | 3 |
| 3 | 1 |
| 3 | 2 |
| 4 | 1 |
| 5 | 1 |
| 5 | 2 |
Any tips or tricks?