cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rgparisoto
Helper V
Helper V

Can't get the field with "Get Items"

Hi Friend! Robson! From Brazil!

 

I'm in trouble here with a Flow, let me tell you.

 

First of all I have a connection with a SQL Server table, to work every time an item is inserted (a product).

When it happens, my flow goes to another table, when find the code of this product, and return the parts it it been made, that can be one or more.

 

For example: I have a product with id 12, and I insert it at table 1; 

BaixaEstoqueTabela1.png

 

After it, I go to table two and get all items that is related to FK_Produto 12; 

BaixaEstoqueTabela2.png

 

At Flow, all this information is corret, look (it returns from second table): {
  "@odata.context""",
  "value": [
    {
      "@odata.etag""",
      "ItemInternalId""",
      "Id_FichaTecnica"76,
      "Id_Produto"12,
      "Id_Item"2,
      "Quantidade"2.2,
      "Status""Ativo",
      "DataCadastro""2018-06-07T02:07:31.45Z",
      "CadastradoPor"""
    },
    {
      "@odata.etag""",
      "ItemInternalId""",
      "Id_FichaTecnica"77,
      "Id_Produto"12,
      "Id_Item"32,
      "Quantidade"0.2,
      "Status""Ativo",
      "DataCadastro""2018-06-07T02:07:43.667Z",
      "CadastradoPor"""
    }
  ]
}

 

At last part, I want to save it at the last table, multiplying the "Quant" field from first table to "Quantidade" field to the second. But, when I try to do it, this error happens:

 

InvalidTemplate. Não foi possível processar as expressões de linguagem do modelo nas entradas 'Inserir_linha' da ação na linha '1' e na coluna '2485': 'A função de linguagem do modelo 'mul' espera que seu primeiro parâmetro seja um número inteiro ou um número decimal. O valor fornecido é do tipo 'Null'.

 

Or in english: InvalidTemplate. Unable to process model language expressions in the 'Insert_line' entries of the action on row '1' and column '2485': 'The language function of template' mul 'expects its first parameter to be an integer or a decimal number. The value supplied is of type 'Null'. 

 

I'm using an expression to creat the mul result, that is this: 

mul(body('Obter_linhas')?['"Quantidade"'],triggerBody()?['Quant'])
 
I think that is this part that is not working, but I don't know that to do to fix it:
body('Obter_linhas')?['"Quantidade"']
 
Has anybody some idea?
 
Thank you so much.
 
Best regards,
Robson.
1 ACCEPTED SOLUTION

Accepted Solutions

Hi @rgparisoto,

 

You could add a Compose before the "Insert row" action inside the apply to each to get the expression of the Quantidade, and the expression of the Quantidade should as below:

 

items('Apply_to_each')?['Quantidade']

 

Best regards,

Alice

View solution in original post

2 REPLIES 2
v-yuazh-msft
Community Support
Community Support

Hi @rgparisoto,

 

Could you please share a screenshot of the configuration of your flow?

 

The error message told that the body('Obter_linhas')?['"Quantidade"'] is null so the mul() expression couldn't work.

 

 

Best regards,

Alice

Hi @rgparisoto,

 

You could add a Compose before the "Insert row" action inside the apply to each to get the expression of the Quantidade, and the expression of the Quantidade should as below:

 

items('Apply_to_each')?['Quantidade']

 

Best regards,

Alice

View solution in original post

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (18,992)