In a Workflow, [Name] results in the computed...

references
(Kristen Davis) #1

In a Workflow, [Name] results in the computed key (which is the timestamp+Name), is there a way to change this so only the name populates in the workflow vs the computed key?

The name column I am wanting to use is a reference to another table if that makes a difference.

Thank you!

(Reza Raoofi) #2

If [Name] is a Ref column, sounds like that timestamp+Name is a Key in the referrenced table, am I right?

If yes, then check see in that referrenced table only [Name] column is checked as Label in the column structure. I am guessing right now the computed key is checked both as Key and as Label.

(Kristen Davis) #3

Yes, timestamp+name (Computed key) is the key in the referenced table.

But, only the [Name] column is checked as the label for all tables…I was hoping that was the simple solution. Any other thoughts?

(Reza Raoofi) #4

If that [Name] column in the referenced table is already set as label, and workflow is not showing it, then you can add a Virtual Column and enter a de-reference expression in its App Formula like this: [Name].[NameColumn_in_ReferencedTable]

Then use the Virtual Column in workflow template.

(Kristen Davis) #5

Thank you. I considered that as a possible option but hoped to be able to correct the “problem” because the [Name] reference is used in many places for multiple tables and reports and this workflow error follows it throughout (I will have to change a lot of <> and file names).

Do you feel the virtual columns and de-refs are the best solution? Or should I continue to try to uncover what is causing this undesired outcome and try to correct it?

(Reza Raoofi) #6

If the workflow is showing stored value for the Ref column, instead of label value, then you cannot do anything about it other than using De-reference, but I just recalled there is a better solution than what I said earlier; you actually do not need a virtual column; just enter the De-reference expression directly in those workflow tags like this, and it will work:

<<[Name].[Name_in_RefTable]>>

(Reza Raoofi) #7

@Philip_Garrett_Appsh

Sounds like in workflows Ref columns show stored value as opposed to label value; is this on purpose? Or you already have it on your list to fix it?

(Kristen Davis) #8

The de-reference worked. Thanks!

(Praveen Seshadri (AppSheet)) #9

In the app itself, we make the decision to show labels instead of reference keys. However, it is not so obvious that this is always the right answer in a workflow rule (especially in an attachment document sent as part of a workflow email). So we have to think about this a bit more before deciding what to do here.