I have a workflow to save a file.
In the File Name Prefix I had this formula and it was working for some months:
<<Titel>> <<SUBSTITUTE((IF(ISBLANK([Wohnung]) , [Kunde].[Kunde] & " " & ANY(SELECT(Verwalter[Nachname] , IN([Key] , SELECT(Ansprechpartner[Ansprechpartner] , AND( ISBLANK([Wohnung]) , [Kunde] = [_THISROW].[Kunde] , IN([Funktion] , LIST(Mieter , Eigentรผmer))))))) , [Wohnung].[Wohnung] & " " & ANY(SELECT(Verwalter[Nachname] , IN([Key] , SELECT(Ansprechpartner[Ansprechpartner] , AND([Wohnung] = [_THISROW].[Wohnung] , IN([Funktion] , LIST(Mieter , Eigentรผmer))))))) & " " & IF(ISBLANK([Wohnung]) , INDEX(SPLIT([Kunde].[Adresse] , ",") , 1) , INDEX(SPLIT([Wohnung].[Adresse] , ",") , 1)))) & " " & [Anlagenkomponente].[Produktbezeichnung gesamt] & " " , "/" , "_")>>_<<PDF>>
Now I wanted to change the formula and went into the Expression Assistant.
Without changing the formula the editor says:
could not be parsed due to exception: The given key was not present in the dictionaryโฆ
The same formula is working in a VC. (of course without the <<>>)
So I created a VC [Prefix] and use this VC in the File Name Prefix.
But perhaps you can take a look.
Solved! Go to Solution.
My original Post seems to be fixed. Thank you.
Is โTitelโ correct?
That document is for template files, not expressions in the Expression Assistant. Routing <<OrgUnit>>
is not valid in either template files or expressions. The error message reflects this, just not clearly.
I respectfully disagree. I am not referring to the content of the template file, but the filename of the file generated when the template is filled out (which is working perfectly, by the way). Hence โFile Name Prefixโ. And the help page I linked to specifically indicated that it should be possible to use expressions of <> in name of the file. See screenshots below:
Routing <<OrgUnit>>
is not a valid expression, nor is it what the screenshot you provided shows. The expression in the screenshot, CONCATENATE("Routing", [OrgUnit])
, is valid.
Dear Steve
Please see this help article, second half of the page:
https://help.appsheet.com/en/articles/2848415-creating-and-saving-a-file-from-a-workflow-rule-or-sch...
When I use the column name โ[OrgUnit]โ the value does not appear in the filename when the report is actually generated. Although when I test the expression โCONCATENATE(โRouting_โ, [OrgUnit])โ in the expression builder it tests correctly.
You already know what happens when I use the angle brackets, as directed by the AppSheet help article.
Its a bug.
So, I noticed that the documentation for File Name Prefix was changed so that now it reflects how appsheet actually works (aka, a bug). Were you the one to change the documentation @Steve?
It would have been nice for you / appsheet to say โyes, its a bugโ or โwe got the doc wrong and weโre going to change itโ
There is still a bug in File Name Prefix.
When I use the column name, it does not appear in the name of the file when the report is generated.
When I test the expression CONCATENATE ( โSomeName_โ, [ColumnName] ), the [ColumnName] appears in the test expression. But it does not appear in the report name when the report is generated. See video below:
I was the one that updated the docs because they didnโt match the current behavior. I will update them again to show a better example, but the (admittedly overly-complex) behavior we have currently is that you can still use the angle-bracket syntax but you need to use an expression to generate it. So for example, "SomeName_<<ColumnName>>"
works but SomeName_<<ColumnName>>
will not.
Im sorry, but Ive tried various combinations (as you can see in the next video) and I cannot get it to work. I dont want an overly complex expression in the filename, just the column that represents the organisational unit.
The file contains GPS coordinates for different organisational units, and it is the input file to a Google Apps script that will plan routing. Since each org unit covers a different geographical region I cannot use a generic filename.
I understand this is confusing because there are two-level on expressions, but try your first example "StartStopPoints<<OrgUnit>>"
on creating a real file (you can use the test button on the workflow) and that should work with the correct file name. The test button you used is only to test the expression.
Below is where the run/test button I encourage you to try is located:
I havent tried it yet, but no can do. I notice from the screenshot you posted you suggested generating the file from Worflow tab -> Save File option. As far as I know the File Name Prefix from here has always worked. But trying from the Reports tab -> Save File option gives the problem. I am trying to generate a JSON file from two different unconnected tables. Workflow Save File only allows access to one table, but at least I can define the trigger, in Reports Save File I can specify which tables the template runs on, but it runs on a time-based schedule.
Let me see if I can figure out another way to achieve the (sub)goal of generating an input file.
Hi David,
If I understand you latest post correctly, you are saying:
That is correct, because in a Workflow Rule there is a โcurrent recordโ. The โcurrent recordโ is the record that is being added, updated, or deleted. It is the record that triggered the workflow rule. When you refer to a field in the โFile Name Prefixโ expression, the field name and the field value you are referring to is coming from the โcurrent recordโ.
For a Report there is no โcurrent recordโ. The Report is triggered by the scheduler but there is no โcurrent recordโ. The Report always starts โde novoโ with no โcurrent recordโ. As a result, you cannot refer to a field name or field value in the โFile Name Prefixโ expression from the โcurrent recordโ.
This difference between Workflow Rules and Reports also affect how you write templates. Since a Workflow Rule has a โcurrent recordโ, your template can refer to field names and field values from that record in you Workflow Rule template.
By contrast, in a Report template there is no โcurrent recordโ. Your Report template must begin with a Start expression that retrieves the record or records you wish to display.
In your report, it might be possible to write an expression that retrieves the โOrgUnitโ by some means. However, that expression cannot assume that it is starting from a โcurrent Recordโ, because there is no โcurrent recordโ for a Report.
Ok, thanks for this answer. What you said makes sense. I have indeed found a resolution, using the Workflow Rule and a json template. However, I make use of <> and <> tags to cycle through all the relevant records in on the trigger table, then I use a SELECT to fetch a single row with org unit info from a different table. It works quite well.
My original Post seems to be fixed. Thank you.
User | Count |
---|---|
36 | |
33 | |
27 | |
23 | |
18 |