App Example

Kat
Bronze 1
Bronze 1

Good Morning,

I cannot for the life of me get any version of the substitute expression to work in any location I put it. I think I’m doing something wrong, but I’m not sure. Does someone have an example app where I can see the substitute expression in use?

Thanks,

Kat

0 7 301
7 REPLIES 7

What problem are you experiencing? What have you tried so far? What’s your expression? What’s your result expectation? Support your query with screenshots and expressions if possible.

Kat
Bronze 1
Bronze 1

What I’m attempting to do can be found in the below thread, but at this point I’m just trying to get any substitution expression to work. I’m trying different columns. I’m trying different locations from the column formula to view displays to actions. I’m trying different values inside the substitution expression. I’ve tried to replace an entire cell value or just a small piece of a long text. Not a single expression I have attempted has resulted in any change in the resulting output. As such, I figure I have to be doing something basic wrong, but I’m not sure what.

Thanks!

Kat

I understand that you want to use the expression possibly in a workflow email template. And how this workflow will be triggered?

How about we keep the original thread in the original thread?

Understood and I’m sorry if starting the second thread caused any issues. I wasn’t trying to start a second thread on the same topic, I was just hoping someone had an app I could look at to better understand substitution.

Thank you,

Kat

Kat
Bronze 1
Bronze 1

Workflow email template will not work in this case. I’m using a parent table to list the classes and then a child table to to store the individual messages for each class. I want the user to be able to add rows to the child table whenever they want to add a new message and add rows to the parent table whenever they want to add a new class. The messages will regularly use different names so I want an automatic substitution for keywords. Ex: If the word Student is used in a message then the substitution expression will replace it with the name listed in the edit only table named Info. This table only has one row to prevent the formula from pulling more than one answer.

That being said, I’m not even close to getting that expression right because I can’t get a regular substitution expression to work. For example, when I plug SUBSTITUTE([Message], “Student”, “Test”) into the formula slot in the column information absolutely nothing changes in the final message seen in the app.

Ideally, I think something similar to the following expression will be what I use, but if I can’t figure out why a regular substitution expression isn’t working then there is no way I’ll be able to figure out a more complicated one. That is why I’m hoping someone has a sample app where I can look at how they use the substitution expression.

SUBSTITUTE(
SUBSTITUTE(
SUBSTITUTE(
SUBSTITUTE([Message],
“”, “TEXT(Info[Student])”),
“”, “TEXT(Info[Parent])”),
“”, “TEXT(Info[Greeting])”),
“<He/She>”, “TEXT(Info[He/She])”)
)
)
)

I hope this helps explain everything and thank you so much for your help!

Kat

@Kat
This syntax is not correct at all. TableName[ColumnName] format always returns a comma seperated list and enclosing this with a TEXT function does not change the type. I have replied to you in your original thread found here > Substituting specific words in a message

Top Labels in this Space