Skip to main content
March 28, 2022
Question

Code

  • March 28, 2022
  • 6 replies
  • 0 views

Hi All,

    I want to write the logic for the below requirement 

For example:

------------------

My Input is 1 

Output should be : {2,3,4,5}   

can  anyone share the logic 

Thanks in Advance!

    6 replies

    stefanhelzle0001
    Brainy
    March 28, 2022

    What is the purpose? Is this a test? Did you try enumerate()?

    mikes0011
    Brainy
    March 28, 2022

    What is the actual logic behind this request?   You didn't explain how your output ("{2, 3, 4, 5}") actually relates to the input of "1".  I could write an expression rule hardcoded to output {2, 3, 4, 5} no matter what input value was given, and claim it satisfies this based on the information provided here.

    The Expression Guru
    arockiaprincyv0003
    March 28, 2022

    a!foreach(
    items:{1},
    expression:fv!item+1+enumerate(4)
    )

    andrewh0007
    March 29, 2022

    As has already been said, we need may more info. If you need the proceeding X number of integers after the input number the below will work. But this is really just a stab in the dark.

    a!localVariables(
      local!inputNumber: 5,
      local!numberOfSubsequentIntegersToReturn: 4,
      1 + local!inputNumber + enumerate(local!numberOfSubsequentNumbersToReturn)
    )

    viraty527193
    March 29, 2022

    [mention:eb9a70f0b32a430e8819bff3623248f0:e9ed411860ed4f2ba0265705b8793d05]

    While you post any query can you please try to be more specific with the use case so that it will be easy for other Appian users to provide better solutions catering to query more profoundly?

    just trying to keep the community clean.

    mikes0011
    Brainy
    March 29, 2022
    While you post any query can you please try to be more specific with the use case

    and also... please, please, please... no more one-word post titles (!!!)

    The Expression Guru