Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_Related Related Topics sp_TopicIcon
Changing field to required and then to non-required using Automation Scripts
September 9, 2013
7:25 pm
Avatar
rtyshler
Member
Members
Forum Posts: 7
Member Since:
August 7, 2013
sp_UserOfflineSmall Offline

I need to make Field1 required if Field2 has a value and Field1 non-required if Field2 doesn’t have a value within the same transaction.

Example: In Work Order Tacking / Plans / Tasks,

I need to make the INSPECTOR field required when OBSERVATION is not Null.  I was able to accomplish this using an automation script as follows:

 

if observation==”:

     inspector_required=False

else:

     inspector_required=True

 However, say the user changes their mind and they don’t want to provide an observation.  If I remove the entered value in the OBSERVATION field, INSPECTOR still stays required. It seems that I cannot change INSPECTOR back to no-required without canceling the transaction (the else clause below doesn’t work).  Any ideas?  Thanks in advance.

September 10, 2013
10:14 am
Avatar
Chon
Stoneham, MA USA
Admin
Forum Posts: 1118
Member Since:
March 2, 2009
sp_UserOfflineSmall Offline

Hello, Please register to see the Admin’s answer!

September 10, 2013
12:37 pm
Avatar
rtyshler
Member
Members
Forum Posts: 7
Member Since:
August 7, 2013
sp_UserOfflineSmall Offline

Yes, it is.  And thank you.  Works much better with “is None”.

September 27, 2013
3:54 am
Avatar
Michela Brunello
Member
Members
Forum Posts: 3
Member Since:
September 23, 2013
sp_UserOfflineSmall Offline

Hi,

I have a problem with a jython script in Maximo 7.5 too.

I’m trying to make a required field of an attribute “readonly”.

I use the command: “var_readonly = True”, but it doesn’t work. The var is INOUT.

There are other options to check?

Thanks in advance

September 27, 2013
2:53 pm
Avatar
Chon
Stoneham, MA USA
Admin
Forum Posts: 1118
Member Since:
March 2, 2009
sp_UserOfflineSmall Offline

Hello, Please register to see the Admin’s answer!

February 23, 2015
2:24 am
Avatar
ram prasad
New Member
Members
Forum Posts: 1
Member Since:
February 23, 2015
sp_UserOfflineSmall Offline

AND when i insert some value in the observation 

eg-

if observation==’hello’:

     inspector_required=True

else:

     inspector_required=False

 

then only after inserting some value in the inspector field it becomes required else not.

and even after deleting value from that field,it is required.

your reply would be appreciated,

Thanks

Forum Timezone: America/New_York

Most Users Ever Online: 54

Currently Online:
1 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

sun kim: 60

madd0g17: 59

v.barsamov: 51

cgregory: 45

Maximofresher: 45

matta0990: 33

Member Stats:

Guest Posters: 0

Members: 14366

Moderators: 0

Admins: 4

Forum Stats:

Groups: 1

Forums: 8

Topics: 1580

Posts: 4295

Newest Members:

Megan Morgan, Devendra Verma, stephen stephens, maxexpertise Hilal, Jeroen van Proosdij, Neeraja N

Administrators: Chon: 1118, kristensibilia: 0, Joe Grassia: 0, bpaik: 0