Help please! I am working on a form where I need to restrict the user's input to 5 items only. The user is using a text input box that is connected to a gallery and displaying the results they type in. After that I have a submit button to submit the entire form to a SharePoint list. I can't figure out how to code this to make it work properly. The following code is what I have for the "Add" button that adds the input to the gallery:
Set(mycounter, 0);
If(IsBlank(TextInputStaticIP.Text),false, Collect(colStaticIPAddress, {IP: TextInputStaticIP.Text}));
(mycounter + 1)
If(mycounter > 5, Reset(Gallery7_1); Reset(TextInputStaticIP))