Author Topic: How to get the Lock status - want to use ApplyGroupLock  (Read 229 times)

Lal

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
How to get the Lock status - want to use ApplyGroupLock
« on: April 18, 2019, 01:08:53 am »
I want to check the lock status of an element before applying a group lock using ApplyGroupLock.

How to check if group lock is already applied?

My understanding of the lock state is that

1. "No lock, general editing allowed" : Locked = false
2. "Full lock, no-one may edit": Locked = true
3. "User lock, locking user may still edit":  ApplyUserLock() applied
4. "Group lock, locking group may still edit":ApplyGroupLock() applied

Is this correct?

qwerty

  • EA Guru
  • *****
  • Posts: 10270
  • Karma: +220/-177
  • I'm no guru at all
    • View Profile
Re: How to get the Lock status - want to use ApplyGroupLock
« Reply #1 on: April 18, 2019, 06:11:28 am »
It all depends on whether you are using Require User Lock to Edit or not.

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 6667
  • Karma: +63/-6
    • View Profile
Re: How to get the Lock status - want to use ApplyGroupLock
« Reply #2 on: April 18, 2019, 09:34:23 am »
It all depends on whether you are using Require User Lock to Edit or not.

q.
In this case it's not being used. If you're using "Require User Lock to Edit" then there are no group locks.
Eve

support@sparxsystems.com

Lal

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: How to get the Lock status - want to use ApplyGroupLock
« Reply #3 on: April 18, 2019, 05:31:42 pm »
Hi,
      What I am trying to do is to lock a requirement so that a user from the same group cannot change it.

The script is part of a workflow to do some checks before locking the requirement.

Do I have to use both "Locked = True" and ApplyGroupLock() ?

Thanks

Lal