Skip to main content
November 19, 2021
Question

You have 2 local variable a=10 and b=20. so how we will print between a and b in appian code.

  • November 19, 2021
  • 4 replies
  • 0 views

You have 2 local variable a=10 and b=20. so how we will print between a and b in appian code.

    4 replies

    selvakumark
    Participating Frequently
    November 19, 2021

    I would like to know the use case here. Assuming b will be always greater than a & we need to exclude a & b, here's one solution

    a!localVariables(
      local!a: 10,
      local!b: 20,
      enumerate(local!b - local!a - 1) + local!a + 1
    )

    pd0003Author
    November 19, 2021

    Thank you so much. There is one more question if you can help.

    There are 2 value dynamically given . you need to multiply the both value without using *. For example if two value is 2,3 then either you cab add 2+2+2 or 3+3 .

    selvakumark
    Participating Frequently
    November 19, 2021

    This is one way without using Appian OOTB function-

    a!localVariables(
      local!a: 15,
      local!b: 15,
      sum(
        a!forEach(
          items: enumerate(local!a) + 1,
          expression: local!b
        )
      )
    )