Skip to main content

Hi, I have a problem with a PXSelector, when I try to select an option, the field don't select the value, just select and clear the value

this is my code.

 #region PermisoSCT
    ÂPXDBString(50, IsKey = true, IsUnicode = true, InputMask = ">CCCCCCCCCCCCCCC")]
     PXDefault(PersistingCheck = PXPersistingCheck.NullOrBlank)]
    >PXUIField(DisplayName = "Permiso SCT", Visibility = PXUIVisibility.SelectorVisible)]
    PXSelector(typeof(Search<c_TipoPermiso.clave>),
                    typeof(c_TipoPermiso.descripcion))]
    public virtual string PermisoSCT { get; set; }
    public abstract class permisoSCT : PX.Data.BQL.BqlString.Field<permisoSCT> { }
    #endregion

 

and this is my code from the values for the pxSelector

   #region Clave
    ÂPXDBString(6, IsUnicode = true, InputMask = "")]
    uPXUIField(DisplayName = "Clave")]
    public virtual string Clave { get; set; }
    public abstract class clave : PX.Data.BQL.BqlString.Field<clave> { }
    #endregion

    #region Descripcion
    pPXDBString(254, IsUnicode = true, InputMask = "")]
    UPXUIField(DisplayName = "Descripcion")]
    public virtual string Descripcion { get; set; }
    public abstract class descripcion : PX.Data.BQL.BqlString.Field<descripcion> { }
    #endregion

 

Hi @emmanuelmeza62  Can you please replace with below DAC and verify.

 

 #region PermisoSCT
PXDBString(50, IsKey = true, IsUnicode = true, InputMask = ">CCCCCCCCCCCCCCC")]
PXDefault(PersistingCheck = PXPersistingCheck.NullOrBlank)]
PXUIField(DisplayName = "Permiso SCT", Visibility = PXUIVisibility.SelectorVisible)]
PXSelector(typeof(c_TipoPermiso.clave),
typeof(c_TipoPermiso.descripcion))]
public virtual string PermisoSCT { get; set; }
public abstract class permisoSCT : PX.Data.BQL.BqlString.Field<permisoSCT> { }
#endregion

 

Can you please also confirm that, in .aspx page are you using PXSelector OR PXSegmentMask control?


hi @Naveen B , the code don’t work. I’m using PXSelector in .aspx

 

and show you the error,

when I select an option, 
don’t select anything, just only appears selected and is then deleted

 


@emmanuelmeza62  Thanks for the confirmation. I have used the below code format and it is working for me. Can you please also verify and confirm.

 

 #region PermisoSCT
PXDBString(50, IsKey = true, IsUnicode = true, InputMask = ">CCCCCCCCCCCCCCC")]
PXDefault(PersistingCheck = PXPersistingCheck.NullOrBlank)]
PXUIField(DisplayName = "Permiso SCT", Visibility = PXUIVisibility.SelectorVisible)]
PXSelector(typeof(Search<c_TipoPermiso.permisoSCT>), typeof(c_TipoPermiso.permisoSCT), typeof(c_TipoPermiso.clave),
typeof(c_TipoPermiso.descripcion))]
public virtual string PermisoSCT { get; set; }
public abstract class permisoSCT : PX.Data.BQL.BqlString.Field<permisoSCT> { }
#endregion

 Hope this helps!


Reply