Stored Proc Parameter not present

Hi,

I have a stored procedure with date parameter to populate a datagrid. I created a page with a datepicker to invoke SP in change event, however parameter value is not passed to oData call.

image

Steps:
1 - I created a form property "fecha" and initialized to new Date()
2 - Added datepicker with ${fecha} in value property
3 - Added "Invoke datasource method" in datepicker change event:

4 - Running app I see that "Fecha" parameter is null
5 - In component code I don't see parameter generated in call signature:

Seems to be some generator issue... Or may be another reason?

Thansk for your assistance.

Best Regards

Hi @Carlos_Carminati,

Can you post your SP definition? Is Fecha parameter string?

UPDATE: I was able to replicate the problem, will post more info in this thread!

Best,
Vladimir

Hi @Carlos_Carminati,

The problem was caused by not serialized parameter name for the Invoke action in page json. For example:

"parameters": [
          {
            "value": "${fecha.toISOString()}"
          }
          ...
        ],

It should be:

"parameters": [
          {
            "name": "Fecha",
            "value": "${fecha.toISOString()}"
          }
         ....
        ],

Can you check if this is case in your meta/[PAGE_NAME].json?

We will release fix later today!

Best,
Vladimir

This is the SP:

ALTER PROCEDURE [dbo].[GetConsumosByFecha]
-- Add the parameters for the stored procedure here
@Fecha datetime
AS
BEGIN

SELECT [Fecha]
  ,[IdEquipo]
  ,e.nombre as NombreEquipo
  ,e.codigo as CodigoEquipo
  ,[IdInsumo]
  ,i.Nombre as Insumo
  ,[IdUnidad]
  ,u.nombre as Unidad
  ,[UReal]

FROM [REEData].[dbo].[REE_ConsumoDetallado] c
INNER JOIN REEConf.dbo.equipos e ON c.IdEquipo = e.id
INNER JOIN REEConf.dbo.insumos i on c.IdInsumo = i.id
INNER JOIN REEConf.dbo.unidades u on c.IdUnidad = u.id
WHERE Fecha = @Fecha
END

I used this because I need to join tables from two databases.

image

Fixed with 2.13.1 release. Thanks!