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'. Confira os detalhes de uso em https://aka.ms/logicexpressions#mul.'.

 

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'. Check the usage details at https://aka.ms/logicexpressions#mul. '.

 

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

6 REPLIES 6
Community Support Team
Community Support Team

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

Hi @rgparisoto,

 

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

 

Please make sure there is no item with it's Quantidade column be null.

 

Best regards,

Alice

rgparisoto
Level: Powered On

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

Hi @v-yuazh-msft!

 

Thank you for your feedback!

 

I have tested hundreds of models without sucess.

 

I don't know why the field do not appear at expressions when I try to multiply it.

 

There's no way to do it without use expressions? Using the ( * ) for example?

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?

 

Best regards,

Alice

rgparisoto
Level: Powered On

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

Of course @v-yuazh-msft!

 

Look:

- The first part of the flow:

Flow_Part1.png

 

The second part (I want to calculate field "Quant" x "Quantidade":

Flow_Part2.png

 

When I try to use mul, the field "Quantidade" do not appear:

Expression1.pngExpression2.png

 

Tell me if it can help you!

 

Best regards,

Robson.

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

rgparisoto
Level: Powered On

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

Solved @v-yuazh-msft!

 

Tested lots of times without sucess, delete all the steps and create again doing all the job correctly!

 

Thank you so much for your help!

 

Best Regards,

Robson, from South Brazil!

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 (Last 30 Days)
Users online (6,930)