This is an archive of the Maximo Yahoo Community. The content of this pages may be a sometimes obsolete so please check post dates.
Thanks to the community owner Christopher Wanko for providing the content.
Conditional UI alone is just that. It will only let you conditionally alter the UI and not the data. You will have to incorporate an action, automation (depending on version), or similar to null the data.
Sent on the new Sprint Network from my Samsung Galaxy S®4
-------- Original message --------
From: "therron@pcci.edu [MAXIMO]" <MAXIMO@yahoogroups.com>
Date: 08/11/2015 10:03 AM (GMT-06:00)
To: MAXIMO@yahoogroups.com
Subject: [MAXIMO List] how to use Conditional UI to set a NULL
Anyone know how to use Conditional UI to set a NULL value?
I made two custom fields/attributes. One is a checkbox/YORN, the other a textbox. For Conditional UI, if the checkbox is un-checked, the textbox should be read-only and have a NULL value. If the checkbox is checked, then the textbox is required.
I've got it all working, except for if a user checks the checkbox, fills in the then-required textbox, then un-checks the checkbox. That would leave the value in the textbox and make the textbox readonly. I need it to make the textbox NULL.
I can't figure out how to use the Configure Conditional UI screen on the control properties in Application Designer to tell it value = NULL. Help?
Travis Herron
An automation script on the checkbox attribute launch point can null it and, if you wish, make it read only.
On August 11, 2015 at 4:06:54 PM CDT, john rice ecirnhoja@msn.com [MAXIMO] <MAXIMO@yahoogroups.com> wrote: Conditional UI alone is just that. It will only let you conditionally alter the UI and not the data. You will have to incorporate an action, automation (depending on version), or similar to null the data. Sent on the new Sprint Network from my Samsung Galaxy S®4 -------- Original message -------- From: "therron@pcci.edu [MAXIMO]" <MAXIMO@yahoogroups.com> Date: 08/11/2015 10:03 AM (GMT-06:00) To: MAXIMO@yahoogroups.com Subject: [MAXIMO List] how to use Conditional UI to set a NULL Anyone know how to use Conditional UI to set a NULL value? I made two custom fields/attributes. One is a checkbox/YORN, the other a textbox. For Conditional UI, if the checkbox is un-checked, the textbox should be read-only and have a NULL value. If the checkbox is checked, then the textbox is required. I've got it all working, except for if a user checks the checkbox, fills in the then-required textbox, then un-checks the checkbox. That would leave the value in the textbox and make the textbox readonly. I need it to make the textbox NULL. I can't figure out how to use the Configure Conditional UI screen on the control properties in Application Designer to tell it value = NULL. Help? Travis Herron
I'm fairly certain this ought to be easy. I've read the documentation, read a bunch of examples, and it looks easy. . .and yet I can't get it to work. Can someone see what I've done wrong? (Fair warning, today is Day 1 for my scripting experience).
In the PERSON table, I made 2 custom attributes: PCCISCONTRACTOR (this is a YORN attribute) and PCCVENDORCOMPANY (this is Same As COMPANIES.COMPANY and has a table domain attached). Both have controls added to the Person app using Application Designer.
The logic to employ is: if PCCISCONTRACTOR is checked, PCCVENDORCOMPANY is required. If PCCISCONTRACTOR is un-checked, PCCVENDORCOMPANY is to have a NULL value and be readonly. Sounds simple enough. . .
My Launch Point is:
Active (checked)
Object = PERSON
Attribute = PCCISCONTRACTOR
Event = Run Action (though I have my doubts as to whether or not that is the correct choice -- I want to perform multiple events, Initializing a value and modifying access restrictions)
Variables:
variable = v_pccvendcomp
type = INOUT
Binding Type = ATTRIBUTE
Binding Value = PCCVENDORCOMPANY
Script:
Language = python
Source Code=
if pcciscontractor>= 1:
v_pccvendcomp_required=True
else:
v_pccvendcomp_required=False
v_pccvendcomp_readonly=True
v_vendcomp=None
So I went through the wizard to create that, pushed the Create button, it said it created it.
Now I go to the People app, and changing the values in either of those fields is doing nothing special, nothing according to what my script intends, just behaving as it would OOTB.
What did I miss?
Travis Herron
Never mind, IBM Tech Support found the problem. . .Admin Mode was on.
Travis Herron
Travis: I would just use a data restriction for that...
Shannon
Sent from my wonderful BlackBerry Z30 smartphone!
Original Message
From: therron@pcci.edu [MAXIMO]
Sent: Wednesday, August 12, 2015 11:33 AM
To: MAXIMO@yahoogroups.com
Reply To: MAXIMO@yahoogroups.com
Subject: RE: [MAXIMO List] how to use Conditional UI to set a NULL
I'm fairly certain this ought to be easy. I've read the documentation, read a bunch of examples, and it looks easy. . .and yet I can't get it to work. Can someone see what I've done wrong? (Fair warning, today is Day 1 for my scripting experience).
In the PERSON table, I made 2 custom attributes: PCCISCONTRACTOR (this is a YORN attribute) and PCCVENDORCOMPANY (this is Same As COMPANIES.COMPANY and has a table domain attached). Both have controls added to the Person app using Application Designer.
The logic to employ is: if PCCISCONTRACTOR is checked, PCCVENDORCOMPANY is required. If PCCISCONTRACTOR is un-checked, PCCVENDORCOMPANY is to have a NULL value and be readonly. Sounds simple enough. . .
My Launch Point is:
Active (checked)
Object = PERSON
Attribute = PCCISCONTRACTOR
Event = Run Action (though I have my doubts as to whether or not that is the correct choice -- I want to perform multiple events, Initializing a value and modifying access restrictions)
Variables:
variable = v_pccvendcomp
type = INOUT
Binding Type = ATTRIBUTE
Binding Value = PCCVENDORCOMPANY
Script:
Language = python
Source Code=
if pcciscontractor>= 1:
v_pccvendcomp_required=True
else:
v_pccvendcomp_required=False
v_pccvendcomp_readonly=True
v_vendcomp=None
So I went through the wizard to create that, pushed the Create button, it said it created it.
Now I go to the People app, and changing the values in either of those fields is doing nothing special, nothing according to what my script intends, just behaving as it would OOTB.
What did I miss?
Travis Herron