By using this website, you agree to our Terms of Use (click here)
I am playing around with the PXUIVisible attribute. I would like to have a "child" field's visibility react to the value of a second "parent" field. If the value of the parent is set upon loading, the child's visibility will be correct. It does not seem to react to changes to the parent field though. So to get the desired effect using only PXUIVIsible, the parent would have to be set, then record saved.
I'd like to avoid adding an event handler in the Graph and get the field to react to changes only using a combination of PXUIVisible and other attributes. Is this possible?
*Edit, record only needs to be saved for the screen to adjust the child's visibility.
I was able to sort this out! The parent is a custom dropdown field and I had to set CommitChanges property to True on the UI element. Now the screen reacts to the changes just using the attribute. It ended up something like this:
#region UsrMyParentField
[PXDBString()]
[MyGraphExtDropdown.List()]
[PXUIField(DisplayName = "MyParentField")]
public virtual string UsrMyParentField { get; set; }
public abstract class usrMyParentField : IBqlField { }
#endregion
#region UsrMyChildField
[PXDBInt]
[PXUIField(DisplayName = "MyChildField")]
[PXUIVisible(typeof(Where<TheDACExt.usrMyParentField, Equal<MyGraphExtDropdown.listValue>>))]
public virtual int? UsrMyChildField { get; set; }
public abstract class usrMyChildField : IBqlField { }
#endregion
Hey Wyatt.ERP,
You're probably better off posting this on StackOverflow. There are a lot of developers that frequent that area. Mostly end users and power users here.
https://stackoverflow.com/questions/tagged/acumatica