How can I change the name of the list as a text?

Options

I have a list name 'Group' and it has "city", "state", and "country" as value.

Then, I have other lists named 'City', 'State', and 'Country' and those list contains its own items.

City = New York, LA, Chicago, Dallas......

State = NY, CA, IL, TX.......

Country = US, CA, ......

In a module, I have three line items named "city", "state", "country" and its data type is assigned as 'City', 'State', 'Country' list and open for user input.

Then, I have another line item called "type" and its data type is assigned as 'Group' list.

If I want to write a formula for this "type" line item to show the type of group that is filled in at city -> state -> country order, how can I write the formula without hard coding the text field??

I came out with this formula and it does the job that I am looking for, but I would like to know a way to do the same job without hard coding the text as "city" or "state"

IF

ISNOTBLANK(city)

THEN

FINDITEM(Group, "city")

ELSE

IF

ISNOTBLANK(state)

THEN

FINDITEM(Group, "state")

ELSE

IF

ISNOTBLANK(country)

THEN

FINDITEM(Group, "country")

ELSE

BLANK

Your help is highly appreciated.

Thank you,

Best Answer

  • AjayM
    edited March 2023 Answer ✓
    Options

    Hi @jkimaa ,

    Instead of allowing the finditem to be recalculated everytime, I would keep these in a SYS module, and refer those lineitems wherever I want. That way, you can centralise the common calculation once and use it multiple times.

    If 'Group' is a non-production list, you might even avoid finditems and simply do as below:


    Hope this makes sense.


    Cheers!