Skip to main content
Question

PXSelector don't select the value in required field

  • 24 February 2022
  • 3 replies
  • 344 views

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 = "")]
    [PXUIField(DisplayName = "Clave")]
    public virtual string Clave { get; set; }
    public abstract class clave : PX.Data.BQL.BqlString.Field<clave> { }
    #endregion

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

 

3 replies

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3381 replies
  • February 24, 2022

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

 


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3381 replies
  • February 24, 2022

@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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings