Reigner Ouano
Reigner Ouano

Reputation: 135

how to pxselector pxseach with condition in acumatica

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

Upvotes: 0

Views: 783

Answers (2)

Taras
Taras

Reputation: 26

Try changing your condition to Equal<True>

Upvotes: 1

Evgeny Kralko
Evgeny Kralko

Reputation: 342

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

Upvotes: 0

Related Questions