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
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (1,731)