Skip to main content
Answer

Load data from "selector b" depending on "selector a"

  • July 16, 2021
  • 2 replies
  • 392 views

Hello good night, I need to load the data of my "selector Phase Code" with the value that I select from the "selector Estimate Nbr".

 

 

Currently when I change the value of the “estimate Nbr selector”, the values ​​of the “PhaseCode selector” are not updated. I need them to be updated dependent on the Estimate Nbr selector

 

Example of mi Screen 

 

Example of PhaseCode DAC

    #region IdPhaseCode
[PXDBString(15, IsUnicode = true, InputMask = "")]
[PXSelector(typeof(Search<CEEstimateEstimate.idPhaseCode, Where<CEEstimateEstimate.estimateNbr,Equal<CEBidLeveling.estimateNbr.FromCurrent>>>),
typeof(CEEstimateEstimate.idPhaseCode),
typeof(CEEstimateEstimate.idAccountGroup),
SubstituteKey = typeof(CEEstimateEstimate.idPhaseCode))]
[PXUIField(DisplayName = "Phase Code")]
public virtual string IdPhaseCode { get; set; }
public abstract class idPhaseCode : PX.Data.BQL.BqlString.Field<idPhaseCode> { }
#endregion

In the properties of PhaseCode and Estimate Nbr selectors i put the value of commit changes = true, and autoRfresh = true, but nothing happens.

 

I Use the reference this example.

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

 

Can you helpme please or provide me with an example and I adapt it

 

Aditional.

  • Is a customization project.
  • In the code: CEBidleveling is de header table.
  • In the code: CEEstimateEstimate has the phasecode to be loaded.

 

Thanks.

Best answer by eddiedaco

Hi @Naveen B  i resolve it! 

 

The code is the same only change this properties.

Estimate Nbr selector : CommitChanges = true;

PhaseCode selector: AutoRefresh = true;

 

The answer is on this page.

https://stackoverflow.com/questions/37053983/dynamically-changing-pxselector-in-acumatica

 

 

2 replies

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • July 16, 2021

Hi @eddiedaco  You can have same selector code at the DAC level and then write a simple FieldUpdated event for “Estimate Nbr selector” and assign this value to the Phase Code field.

Did you try this?

 


  • Author
  • Varsity I
  • Answer
  • July 16, 2021

Hi @Naveen B  i resolve it! 

 

The code is the same only change this properties.

Estimate Nbr selector : CommitChanges = true;

PhaseCode selector: AutoRefresh = true;

 

The answer is on this page.

https://stackoverflow.com/questions/37053983/dynamically-changing-pxselector-in-acumatica