Skip to Content
author's profile photo Former Member
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 a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on 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 a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.