Int (Integer) Function / Expression | Power Automate

Поделиться
HTML-код
  • Опубликовано: 25 янв 2025

Комментарии • 9

  • @ProsperFlow101
    @ProsperFlow101 3 года назад

    Thanks for the info Flow Joe! I appreciate your valuable knowledge man!

  • @silas1820
    @silas1820 4 года назад +1

    Hi Joe. How would you apply this to an array of string to be converted to integer?

    • @FlowJoeVideos
      @FlowJoeVideos  4 года назад

      Hi Silas, do you want to convert an array of strings to an array of ints or add them all to get a total as an int?
      If you want an array of ints, create a variable of an array type called ConvertedInts.
      Then use apply to each and cycle through the string items in the string array. Within each apply to each, use compose to pass the current item.
      Then you will use append to array (the newly created int array) and use the expression int(outputs(‘compose’)).
      This will convert the current string to an int then add it to the int array.

    • @silas1820
      @silas1820 4 года назад +1

      @@FlowJoeVideos Cool thanks. That sounds easy enough!

  • @Sameerasif1001
    @Sameerasif1001 2 года назад

    Thank you Joe
    I am trying to get some Int data from the response form but some value coming "null" i have already converted string value to int but i am not able to convert "null" value to "0"
    can you please help me.

  • @VANDIK01
    @VANDIK01 4 года назад +1

    great video Joe, I put the whole expression because is not show in the video add(outputs('Convert_the_String_Age_to_an_Int'),1), thanks for sharing!!

  • @edgards
    @edgards 2 года назад

    Hi Joe, how can I convert the data from an array into an integer? Please help.

    • @FlowJoeVideos
      @FlowJoeVideos  2 года назад

      It depends on how you want the data. If you just want the first row in an array to an int then you can use first(ARRAY) to get the first line and wrap it in an int function;
      Int(first(ARRAY)).
      If you want a different line in an array you can do int(ARRAY[2]). Replacing 2 with the line you want from the array.
      Remember, arrays are a list of items, therefore you need to convert the item you want to an int. They’re also base 0, so the first is 0, second is 1 etc. So if you use ARRAY[2] it will give you the third line.

  • @JATM1204
    @JATM1204 3 года назад +1

    Thanks!