0
votes

Hello im working on a project where i have to put a put condition on my selector i know how to pxselect but im now doing it on a dac

 #region UsrMarginCodess
        [PXDBString]
        [PXUIField(DisplayName = "Margincode")]
        [PXSelector(
            typeof(Search<Margincode.code, Where<Margincode.show, Equal<true>>>),
                typeof(Margincode.code))]
        public virtual string UsrMarginCodess { get; set; }
        public abstract class usrMarginCodess : PX.Data.BQL.BqlString.Field<usrMarginCodess> { }
        #endregion

here is my code i want to select margincode where the show is true i just want to show the fields that are true on my selector enter image description here

thank you in advance

2

2 Answers

1
votes

Try changing your condition to Equal<True>

0
votes

Each grid should have a view inside the graph. If you wanna show only records with Margincode.show == true in your grid - you just need to add a condition to the view declaration. For example

public PXSelect<Margincode, 
    Where<Margincode.show, Equal<True>>> MarginCodes;

You can also use a standard Acumatica filter mechanism to filter records by some condition. See "Release AP Documents" (AP501000) screen as an example. enter image description here