Hi @ESAIT ,
1. You just want to save the username to a global variable or a record of the username when the user logs in?
2. Is the user in your SharePoint table a person column?
3. Do you have a Password column in your SharePoint table?
In fact, there is a built-in global variable User() in Power Apps, which stores the information of the current Power Apps user. I did a test, in my scenario the user in my SharePoint table is a person column and I have a Password column. When I click on the login button I use filter() to find the username in sharePoint that is the same as the text input box, and compare the Password, if they are equal I use set() to save the username.
If(TextInput4.Text=First(Filter(list3,person.DisplayName=TextInput3.Text)).Password,Set(glo,TextInput4.Text);Navigate(Screen6),Notify("error"))
Best Regards,
Dezhi