if Someone Lock Job , the other can't get this job but my Toggle can't Lock
if(IsBlank(LookUp(EBAN_Access_DB,ชื่อ=job_1).ITID_NameJob), DisplayMode.Edit, Office365Users.MyProfileV2().displayName=LookUp(EBAN_Access_DB,ชื่อ=job_1).ITID_NameJob, DisplayMode.Edit, !(Office365Users.MyProfileV2().displayName=LookUp(EBAN_Access_DB,ชื่อ=job_1).ITID_NameJob), DisplayMode.View)
Please Help me and thank Advance
Solved! Go to Solution.
Hi @koolsin ,
Are you wanting to "lock" a record? If so you need to know who locked it otherwise Mr A cannot edit the record either.
How are you recording who is doing the job (have you got something like the value of the user's name in a field)?
Thank you for your Code , my new world for me
I use
Disablemode.diable substitute Disablemode.view.
It ' work , the Other can't uncheck this toggle . i don't know why microsoft make Toggle Control different from Other Control. it' s make me confuse a little.
i still wanna thank you very much , WarrenBelz
Hi @koolsin ,
I this what you are looking for?
With(
{
wAccess:
LookUp(
EBAN_Access_DB,
ชื่อ=job_1
).ITID_NameJob
},
If(
IsBlank(wAccess) || wAccess=User().FullName,
DisplayMode.Edit,
DisplayMode.View
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Thank WarenBelz
My point is my toggle , whatever displaymode.edit or displaymode.view .....
it's not lock for my job (the other can't edit my toggle)
i think displayMode.view is fail
(i try separate case to one to one for checking case But Your Code is Great... Thank for New Knowledges )
@koolsin ,
You have not explained what field and/or control is on the toggle and what/when exactly is it supposed to lock.
Thank WarrenBelz
"Reserve Job " Process is
First , Mr. A come in to PowerApps then toggle OnCheck ( write Mr. A to SharePoint List in field "ITID_NameJob" and "yes" in Field "Doing_Job" )
Then , Mr. B can't change Toggle (and Other Object )
but if Mr.A Done he Toggle OnUnCheck (Write "No" in Field "Doing_Job")
Then Mr.B can change Toggle (And Other Object
Remark I think DisplayMode.View is Not work for Toggle
Please Help me WarrenBelz
Hi @koolsin ,
Are you wanting to "lock" a record? If so you need to know who locked it otherwise Mr A cannot edit the record either.
How are you recording who is doing the job (have you got something like the value of the user's name in a field)?
Thank you for your Code , my new world for me
I use
Disablemode.diable substitute Disablemode.view.
It ' work , the Other can't uncheck this toggle . i don't know why microsoft make Toggle Control different from Other Control. it' s make me confuse a little.
i still wanna thank you very much , WarrenBelz
User | Count |
---|---|
257 | |
110 | |
97 | |
52 | |
39 |