Skip to content

Commit 10d0cc9

Browse files
authored
Create Section Editable for specific Location in Draft phase.py
1 parent 6a6d2a4 commit 10d0cc9

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# EDITABLE WHEN EtQScript
2+
# Make the field visible for location 'ABC' in Draft
3+
locs = thisDocument.getField("ETQ$LOCATIONS")
4+
if not locs.isEmpty():
5+
loc = thisDocument.getField("ETQ$LOCATIONS").getUnlocalizedDisplayText()
6+
if Rstring.contains(loc,"ABC") and thisPhase.isStartPhase():
7+
print true
8+
9+
# READ-ONLY WHEN EtQScript
10+
# Make the field read-only for location 'ABC' if not in the Draft phase
11+
locs = thisDocument.getField("ETQ$LOCATIONS")
12+
if not (locs.isEmpty() and thisPhase.isStartPhase()):
13+
loc = thisDocument.getField("ETQ$LOCATIONS").getUnlocalizedDisplayText()
14+
if Rstring.contains(loc,"ABC"):
15+
print true

0 commit comments

Comments
 (0)