Forum Discussion

AmberPolston's avatar
AmberPolston
Qrew Cadet
3 years ago

How to use a text field to populate the field names in a formula field

Is there a way to use the values from a text field ([Text Field) as the "field name" in a formula field.

The text field is populated by a formula converting a [Multi-Select Lookup] field into a formatted text. 
I need the [Formula Text Field] to use the values from the [Text Field] and recognize the information as field names instead of standard text.







------------------------------
Amber Polston
------------------------------

3 Replies

  • AustinK's avatar
    AustinK
    Qrew Commander
    What is the use case for building it from the text field in this process? Maybe if that were explained it would be easier to understand what is happening here in your process and why so someone could help you.

    To me it seems like you should use the Multi-Select Lookup field in your formula and extract what is in there each time with a variable or similar. But I think knowing the use case might help.
  • No, but Yes. No, you can't dynamically change the name of a field based on a formula. But, you can create a Rich Text formula field that would produce a similar result. Something like this:

    "<b>" & [Field Name] & "</b> " & [Field Value]​
    This is very basic, but you can use most any HTML/CSS to format the text in a Rich Text formula. Once you've got the formula producing the content you want, you would just add it on the form and select the 'Use Alternate Label Text' on the form builder, but leave it blank.

    ------------------------------
    Blake Harrison
    bharrison@datablender.io
    DataBlender - Quickbase Solution Provider
    Atlanta GA
    404.800.1702 / http://datablender.io/
    ------------------------------
  • Can you do it like this?

    var text MultiSelect = totext([Multi-Select Lookup]);

    If(Contains($MultiSelect, "Section Name"), [Section Name]) &
    If(Contains($MultiSelect, "Section No."), [Section No.]) &
    .....
    )

    You could wrap the entire thing in a List(";", ......) if you want to separate them by a deliniator.

    ------------------------------
    Mike Tamoush
    ------------------------------