Dynamic List Items in Order Entry Customization

This kind of worked -
image

But it doesn’t act the way I thought it was… I’m going to have to play around with that part of it

LoL it will cause we are using the Contains Operator so anything that field contains will match :slight_smile:

1 Like

I’m a little surprised the tilde works for separating them! Great, now I just need to edit the user codes and this is 99% done.

Again, thanks for all the help Jose. I definitely wouldn’t have been able to do this without you

1 Like

image

3 Likes

Dear josecgomez, I have followed the same steps as mentioned above posts but one more value is coming extra in sub category marked in attached last screen shot






can you please suggest, how to resolve this isuue?

Resolved, I have removed the full description from Sales Category Code.

@Caleb323 your original idea of populating an EpiUltraCombo from the tilde delimited string in UserCodes can work as follows:

using System.Collections.Generic;
using System.Linq;

string SpecialLabelPrinterList = ""; 

// skipping over the code that pulls a tilde delimited string from UserCodes

	private void CmbPrinter_BeforeDropDown(object sender, System.ComponentModel.CancelEventArgs args)
	{
		List<string> printerList = SpecialLabelPrinterList.Split('~').ToList();
		this.CmbPrinter.DataSource = printerList;
	}
2 Likes

Since it looks like this topic is still relatively fresh, I will give my input. The solution I found was pretty easy and required a little less coding than some of the solutions above. I gave most of them a try before settling with the solution outlined below, so thank you all for your contributions.

Overview:
For my example, we have a UD field named DUTMarket_c and a related UD field named DUTSubMarket_c that we wanted to change our options dynamically with the selection of the Market. Instead of using an epiCombo Box, and adding C# code, I used a BAQCombo Box. This allowed me to write a BAQ querying our UDCodes and then using another field as a variable to dynamically change the list as the value of another field changed.

Steps:

  1. Create UD Field #1 (epiCombo)
      - Our DUTMarket_c field is being auto-populated by the Customer Group using a Method Directive BPM. It stores the CustGrup.GroupCode value from the Customer. It is stored as QuoteHed.DUTMarket_c.

  2. Create UD Codes
      - We had 111 new UD Codes for SubMarkets that further defined 15 Markets. I have not found any limitations with the number of UD Codes, so this number is arbitrary. I matched my UDCodes.LongDesc to the options available under CustGrup.GroupCode that I will end up using the equivalent from the QuoteHed table to pass as a variable.

    image

  3. Create BAQ
      - This BAQ is quite simple and only needs to call the variables that you will either be referencing or displaying. I included CodeID, LongDesc, and CodeDesc in my query. I used the table criteria to define which group of UD Codes to include (SubMarket). The tricky part was EpiBinding the LongDesc variable to the QuoteHed.DUTMarket_c. The line that you need to input is structured as follows: [EpiBinding:Table.Field] (Mine looks like this: [EpiBinding:QuoteHed.DUTMarket_c])



  4. Create UD Field #2 (baqCombo)
      - This second UD field is our SubMarket. It uses the Market selection to dynamically change our list of options. It is important to focus on four main values:
  • Display Member: The Colum Name on the BAQ that will be used to display values for the combo.
  • DynamicQueryID: The Dynamic Query ID that will be used to build values for the combo.
  • Value Member: The Column Name on the BAQ that will be used to return values for the combo.
  • EpiBinding: Gets the data bindings for the control. The format must be EpiDataView.ColumnName.



After all the dust settles I have two UD fields where one’s options change as the values of the other are changed.

Example 1:
image


Example 2:
image

I’m getting this error when using @josecgomez method.

System.Data.SqlClient.SqlException (0x80131904): Invalid column name 'CodeDesc'.
   at Ice.Hosting.ServiceCaller.innerGet(MethodSpec plan, CallContext ctx, IceDataContext dataContext, Boolean isGenericOperation, String whereClause, Int32 pageSize) in C:\_Releases\ICE\ICE3.2.400.38\Source\Framework\Epicor.Ice\Hosting\ServiceCaller\ServiceCaller.cs:line 583
   at Ice.Hosting.ServiceCaller.GetRows(IceDataContext dataContext, String boName, String whereClause, Int32 pageSize) in C:\_Releases\ICE\ICE3.2.400.38\Source\Framework\Epicor.Ice\Hosting\ServiceCaller\ServiceCaller.cs:line 322
   at Ice.Services.Lib.BOReaderSvc.GetRowsWithPaging(String serviceNamespace, String whereClause, Int32 pageSize, String columnList) in C:\_Releases\ICE\ICE3.2.400.0\Source\Server\Services\Lib\BOReader\BOReader.cs:line 108
   at Ice.Services.Lib.BOReaderSvc.GetRows(String serviceNamespace, String whereClause, String columnList) in C:\_Releases\ICE\ICE3.2.400.0\Source\Server\Services\Lib\BOReader\BOReader.cs:line 93
   at Ice.Services.Lib.BOReaderSvcFacade.GetRows(String serviceNamespace, String whereClause, String columnList) in C:\_Releases\ICE\ICE3.2.400.0\Source\Server\Services\Lib\BOReader\BOReaderSvcFacade.cs:line 246
   at SyncInvokeGetRows(Object , Object[] , Object[] )
   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
   at Epicor.Hosting.OperationBoundInvoker.InnerInvoke(Object instance, Func`2 func) in C:\_Releases\ICE\ICE3.2.400.38\Source\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 59
   at Epicor.Hosting.OperationBoundInvoker.Invoke(Object instance, Func`2 func) in C:\_Releases\ICE\ICE3.2.400.38\Source\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 28
ClientConnectionId:d4297051-5730-4351-a015-9765910f2834
Error Number:207,State:1,Class:16

Anyone able to help?

	private void cboFaultCause_BeforeDropDown(object sender, System.ComponentModel.CancelEventArgs args)
	{
		// ** Place Event Handling Code Here **
		EpiDataView edv = oTrans.Factory("UD40");
		cboFaultCause.Rows.ColumnFilters["CodeDesc"].FilterConditions.Clear();
		cboFaultCause.Rows.ColumnFilters["CodeDesc"].FilterConditions.Add(Infragistics.Win.UltraWinGrid.FilterComparisionOperator.Contains,(string)edv.dataView[edv.Row]["FaultCode_c"]);
	}

Nobody? Darn… I guess it’s back to the intensive head scratching…

This works for me:
In your EpiCombo cmbSubCategory > SeachFilter : CodeTypeID = ‘SalesSubCat’.

1 Like