Solved

load data in datagrid depending of a selector

  • 26 November 2021
  • 9 replies
  • 175 views

Userlevel 2

Hi good night.

 

I have a problem when i try to “load” data of a selector grid depending of a selector header.

 

When i select the value 21-0049 in the selector, the selector in the grid is empty (Id PhaseCode). The correct operation is: when i select the 21-0049 (in the selector) the selector of the grid (IdPhaseCode) should load the data  related to this Nbr (21-0049)

 

My IdPhaseCode DAC is:

    #region IdPhaseCode
[PXDBInt()]
[PXSelector(typeof(Search<CEEstimateEstimate.idPhaseCode , Where<CEEstimateEstimate.estimateNbr.IsEqual<CEBidPackage.estimateNbr.FromCurrent>>>),
typeof(CEEstimateEstimate.id),
typeof(CEEstimateEstimate.idPhaseCode),
SubstituteKey = typeof(CEEstimateEstimate.description))]
[PXUIField(DisplayName = "Id Phase Code")]
public virtual int? IdPhaseCode { get; set; }
public abstract class idPhaseCode : PX.Data.BQL.BqlInt.Field<idPhaseCode> { }
#endregion

 

  • The CEEstimateEstimate DAC contains the selector information
  • The CEBidPackage.estimateNbr.FromCurrent its the value of the current selector (21-0049, but its seems that its not working)

 

Can you helpme please?

 

A lot of thanks.

icon

Best answer by ChandraM 27 November 2021, 12:39

View original

9 replies

Userlevel 7
Badge +17

Hi @eddiedaco  Is data available related to “21-0049” in this CEEstimateEstimate table?

Userlevel 7
Badge +11

Hi @eddiedaco 

Can you change the selector like below and check once?

  [PXSelector(typeof(Search<CEEstimateEstimate.idPhaseCode , Where<CEEstimateEstimate.estimateNbr.Equal<Current<CEBidPackage.estimateNbr>>>>),

Userlevel 2

Hi @eddiedaco  Is data available related to “21-0049” in this CEEstimateEstimate table?

Hi @Naveen B  yes, data is available

Userlevel 2

Hi @eddiedaco 

Can you change the selector like below and check once?

  [PXSelector(typeof(Search<CEEstimateEstimate.idPhaseCode , Where<CEEstimateEstimate.estimateNbr.Equal<Current<CEBidPackage.estimateNbr>>>>),

Hi @jinin  it didn't work

Userlevel 7
Badge +17

Hi @eddiedaco  There may be chance of getting spaces as suffix for that string just like below, hence it is NOT matching and not filtering the data into the selector. Please find the screenshot for your reference.

 

 

Userlevel 7
Badge +9

Hi @eddiedaco As the requirement is to populate the value of 1 selector based on the value of another, please find the below Post, for your reference. Hope this helps

https://stackoverflow.com/questions/43921265/update-selector-selection-with-another-selectors-selected-value

Thanks

 

Userlevel 7
Badge +9

Hi @eddiedaco Here is the sample to populate the selector based on another, from the link above. Hope this helps.

[PXSelector(typeof(Search<TableTwo.someOtherField,
Where<TableTwo.someRelatedField, Equal<Current<HeaderTable.relatedField>>>))]

In your page file on your grid field, you need AutoRefresh set to true.

 <px:PXSelector ID="edAField" runat="server" DataField="AField" AutoRefresh="True" />
Userlevel 2

Hi @eddiedaco  There may be chance of getting spaces as suffix for that string just like below, hence it is NOT matching and not filtering the data into the selector. Please find the screenshot for your reference.

 

 

a lot of thanks @Naveen B  ill check it!!!

Userlevel 2

Hi @eddiedaco As the requirement is to populate the value of 1 selector based on the value of another, please find the below Post, for your reference. Hope this helps

https://stackoverflow.com/questions/43921265/update-selector-selection-with-another-selectors-selected-value

Thanks

 

thanks! @ChandrasekharM  ill check it!

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved