Skip to Content
avatar image
Former Member

CR2013 - Use dynamic fieldname in formula

Hi experts,

I would like to know if it's possible to use a dynamic fieldname in a formula.

Example :

I have a query with many fields :

- ID

- Flag (can be 1, 2 or 3)

- Amount1

- Amount2

- Amount3

...

- Amount100

If Flag = 1, I need to take Amount1, If 2, Amount 2, ...

So I use a case statment :

select {Flag}

     case "1":

          {Amount1}

     case "2":

          {Amount2}

     case "3":

          {Amount3}

...

     case "100":

          {Amount100}

     default:

          0

Instead, what I would like to do is something like :

{Amount & {Flag}} to remove the case statement.

I'm not sure to be clear.

Thank you in advance.

Regards,

Thomas.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Oct 22, 2015 at 11:33 AM

    Hi Thomas,

    If you want the field to be dynamic based on the flag, you would need that case statement.

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded