cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
rgparisoto
Level: Powered On

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
Community Support Team
Community Support Team

Re: Can't get the field with "Get Items"

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
Community Support Team
Community Support Team

Re: Can't get the field with "Get Items"

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

Community Support Team
Community Support Team

Re: Can't get the field with "Get Items"

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 222 members 5,863 guests
Please welcome our newest community members: