Skip to main content
Question

Selector search on decimal Dac field, parse error

  • June 26, 2025
  • 0 replies
  • 33 views

 

Pop-up alert: Failed to convert parameter value from a String to a Decimal.

Custom table decimal field created as selector column in UI.

Dac:

    #region DecimalField
    [PXDBDecimal(0)]
    [PXSelector(typeof(Search<TableName.decimalField>), typeof(TableName.decimalField),
    Filterable = true )] 
[PXUIField(DisplayName = "DecimalField")]
public virtual Decimal? DecimalField { get; set; }
public abstract class decimalField: PX.Data.BQL.BqlDecimal.Field<decimalField> { }

UI: 

<px:PXSelector runat="server" ID="CstPXSelector39" DataField="DecimalField" ></px:PXSelector>

Created a GI with the same field and able to search and retrieve records. But from UI selector field search is not retrieving related records just display all records.

 

Tried Search equal to current , search3….Also tried making other decimal fields as selector, on search retrieving records as expected not sure why only one field while is also parameter of GI is having issue.

 

Any suggestions on how to solve the issue?

 

 

Trace:

System.FormatException
Message:
Input string was not in a correct format.
Stack Trace:
 at PX.Data.PXFirstChanceExceptionLogger.ProfilerFirstChanceException(Object o, FirstChanceExceptionEventArgs args) at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) at System.Number.ParseDecimal(String value, NumberStyles options, NumberFormatInfo numfmt) at System.Convert.ToDecimal(String value, IFormatProvider provider) at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider) at Microsoft.Data.SqlClient.SqlParameter.CoerceValue(Object value, MetaType destinationType, Boolean& coercedToDataFeed, Boolean& typeChanged, Boolean allowStreaming) at Microsoft.Data.SqlClient.SqlParameter.GetCoercedValue() at Microsoft.Data.SqlClient.SqlParameter.Validate(Int32 index, Boolean isCommandProc) at Microsoft.Data.SqlClient.SqlCommand.BuildParamList(TdsParser parser, SqlParameterCollection parameters, Boolean includeReturnValue) at Microsoft.Data.SqlClient.SqlCommand.BuildExecuteSql(CommandBehavior behavior, String commandText, SqlParameterCollection parameters, _SqlRPC& rpc) at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at Microsoft.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)