Hello,
I want in a screen to display a gallery with all my registration on a tab called "all agents" and in another tab to display only the information of the logged in user in a display form that can be displayed in modofiable if click on a button.
I put this code in onstart
ClearCollect(
colTabs;
{
Title: "All Agents";
ID: 1;
Logo: Icon.Tag
};
{
Title: "My Infos";
ID: 2;
Logo: Icon.LogJournal
}
);;
Set(
varTabSelected;
1
)
My "HomeScreen" screen "onvisible"
UpdateContext({CurrentUser:User().Email});;UpdateContext({locTab:1})
Item from my gallery "galHome_1"
If(
varTabSelected = 1;
Filter(
BdMs_New;
StartsWith(
Nom;
txtNom_1.Text
) && (Sdis.Value = RadioSdis.Selected.Value || RadioSdis.Selected.Value = Blank())
&& ((CheckMe.Value && 'Email pro' = CurrentUser) || CheckMe.Value = false)
&& ((CheckUV.Value && "yes" in ForAll(cbUV.SelectedItems;If(Value in 'UV Pompiers'.Value;"yes";"no"))) || CheckUV.Value = false)
&& ((CheckFonction.Value && "yes" in ForAll(cbFonction.SelectedItems;If(Value in 'Fonction Musar'.Value;"yes";"no"))) || CheckFonction.Value = false)
);
Filter(
BdMs_New;
'Email pro' = CurrentUser)
)
I don't see how to make my form display the information of the logged in user
Solved! Go to Solution.
@Fa1con74
You don't need to add anything visible, that should filter the users and show only what they created
What is Email pro field type secondly add this onStart make it global variable by doing this
Set(CurrentUser,User().Email)
Run it and tested, let me know
Hi @Fa1con74
Have look this video explained by @RezaDorrani here the link you can also download the sample and see how how he made it
Hi @Fa1con74
On your GalTabs, use the even on Select.. Check condition if the selcted tab value is 1 or 2 based on that you have to either hide your GalAllAgents or your Edit form.
When it comes to display the information of the user on a form, follow this link Power Apps Guide - Forms - How to show Office 365 user profile details on a form - Power Apps Guide ...
This should help, if not, let us know what exactly is the problem you are facing..
thank you
-Srikanth
Thank you, I understood how to make my tabs, however, I don't understand how to make my filter to display only the logged in user's file
Have you tried the first or second option from this blog post ?? http://powerappsguide.com/blog/post/show-office-365-profile-detail-in-form
Thank you
-Srikanth
I expressed myself badly, I want only the connected user's file to be displayed and not the office user profile
@Fa1con74
Lets do basics add a gallery on screen and on items property add this code and tell me what you see?
Filter(
BdMs_New;
'Created By'.Email = User().Email)
I believe your in Europe correct ? you will need to use ; instead ,
Thanks, I modified your solution, but it doesn't work.
Filter(
BdMs_New;
'Email pro' = CurrentUser)
In my database there is an 'Email pro' field and in the visible part of my screen I put
UpdateContext({CurrentUser:User().Email});;UpdateContext({locTab:1})
I don't understand why it doesn't work
@Fa1con74
You don't need to add anything visible, that should filter the users and show only what they created
What is Email pro field type secondly add this onStart make it global variable by doing this
Set(CurrentUser,User().Email)
Run it and tested, let me know