Check for integer values in array

hi folks,

Is there a way to check for integer values for each value in an array?  The array can have text or integer values.

I have already tried using like() but its not accurate as the size of the digits change i.e, double digits or triple digit numbers. Checking with tointeger() also failed as it converted text values into integers and when passed to the group() function it gave me an incorrect result. 

TIA!!

  Discussion posts and replies are publicly visible

Parents
  • Hi - You can check the value type in Appian in following way-

    typeof(123) /*returns 1, depicts the integer value*/
    typeof({123}) /*returns 101, depicts the array integer value*/
    typeof("test string") /*returns 3, depicts the string value*/
    typeof({"test string"}) /*returns 103, depicts the array string value*/

    Run a loop on your array and check the returned value of typeof function for each iteration.

    Hope this helps!

Reply
  • Hi - You can check the value type in Appian in following way-

    typeof(123) /*returns 1, depicts the integer value*/
    typeof({123}) /*returns 101, depicts the array integer value*/
    typeof("test string") /*returns 3, depicts the string value*/
    typeof({"test string"}) /*returns 103, depicts the array string value*/

    Run a loop on your array and check the returned value of typeof function for each iteration.

    Hope this helps!

Children