Hello,
Currently when a tech logs into my app with their id Number the rest of the fields will auto fill with the users info. I created a collection containing the user info. the two fields I'm having issue with are the TechName and Access_Level.
I have textinput on other screen that I want to use the collection info for. (The Access_Level will only have a value of Admin or User.)
If logged in as “User” the textinput will show the Techs name and the display mode will be in View mode. If logged in as Admin the textinput will be blank and in Edit mode.
My Collection:
ClearCollect(LoggedinUserInfo,{TechName:Tech_Name_TextInput.Text,TechID:'ID#_TextInput'.Text,Access_Level:Access_Level_TextInput_1.Text,TechEmail:Email_TextInput.Text,TechShift:Shift_TextInput.Text,TechWhse:WH_TextInput.Text,TechFacility:Facility_TextInput.Text,TechOrg:Org_Relation_TextInput.Text})
Right now, for the textinputs I am referencing the fields on the login screen to make this work but I get performance issues in the app checker. I want to pull the info from the Collection but I cant get it to work.
This is what I'm currently using.
//Displaymode
If(Access_Level_TextInput_1.Text= "User",View,Edit)
//Default
If(Access_Level_TextInput_1.Text= "User",Tech_Name_TextInput.Text,"")
This is what I would like to use but these are not working.
//Displaymode
If(LookUp(LoggedinUserInfo,Access_Level="User",Access_Level)="true",DisplayMode.View,DisplayMode.Edit)
//Default
If(LookUp(LoggedinUserInfo,Access_Level="User",Access_Level)="true",LoggedinUserInfo.TechName,"")
The displaymode formula doesn’t give any errors but even when logged into the app as a “User” I’m able to edit the textinput on the next screen.
The default, but the formula is not correct and I get “the function ‘If’ has some invalid arguments”.
Thanks for any Help you can give me.