cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Rabbanisyed
Helper V
Helper V

Hiding the control when the user logs in as user in Dataverse Team app

i am new to dataverse and trying to build the helpdesk app and i wanted to hide certain text boxes like ticket-assined , should only be visible to the admin and the technicain can edit the ticket-status. 

 for this i have created a collection

ClearCollect(
isAdmin,
"xyz.com"
);
Set(
verifyemail,
Office365Users.MyProfileV2().mail

)

the collection isAdmin will be tested at the time of login when i user logs in the below and some other control should not appear.

Rabbanisyed_0-1631190285480.png

 

so iam tryin the formula on the control using if(isAdmin,true, Navigate,xyz)....

any help is appriciated..

Reagrds

Rabbani

1 ACCEPTED SOLUTION

Accepted Solutions
Rabbanisyed
Helper V
Helper V

i have solved my issue after spending 3 hours reading global variables and collection, this time i use the global variable and assign the value as email address as admin

 

first APP-> on start i have created a gloabl variable called isAdmin

Set(isAdmin, user().email)

then in visible property i wrote the following formula

isAdmin = "admin@xyz.com" || isAdmin = "admin1@xyz.com" it works

 

View solution in original post

3 REPLIES 3
rampprakash
Super User
Super User

Hi @Rabbanisyed,

 

I think you can try the below.

 

Select the field and Select OnVisible Property

if(isAdmin,true, false);

this code will check if logged ln User is Admin then TRUE(Enable the field) else FALSE(Hide the field)

 

Please mark as Answer if it is helpful and provide Kudos

Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
Blog : https://microsoftcrmtechie.blogspot.com

 

 

i tried the above and i did not succeed, i am still getting error 

 

Rabbanisyed
Helper V
Helper V

i have solved my issue after spending 3 hours reading global variables and collection, this time i use the global variable and assign the value as email address as admin

 

first APP-> on start i have created a gloabl variable called isAdmin

Set(isAdmin, user().email)

then in visible property i wrote the following formula

isAdmin = "admin@xyz.com" || isAdmin = "admin1@xyz.com" it works

 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Users online (3,858)