Hey guys, I hope you are having a wonderful day / night. Unfortunately Iโve been having some trouble on an expression in my Attachment Template. I know this formula works inside of a virtual column, but when trying to use it in the attachment template Iโve ran into some trouble.
Itโs a Select expression, and in the Virtual Column it looks like soโฆ
SUM(SELECT(s0[KG],AND([_THISROW].[Paper Type]=[Paper Type],[Category] = โRECEIVEโ))) - SUM(SELECT(s0[KG],AND([_THISROW].[Paper Type]=[Paper Type],[Category] = โSENDโ)))`
Basically, itโs a product stock control formula that totals the received for a given paper product, and minuses it from the sent to give a โcurrent stockโ value inside of a virtual column to give a numerical value (in Kilograms).
Now this is the difficult partโฆ when trying to create the same result in an attachment template Iโm running into issues. Iโve tried different variations of โfilterโ and โselectโ, and while I have experience in listing items on an attachment template, I donโt know how to work in a Filter AND SUM option concurrently to aggregate the data in these rows like I did in the original formula listed above.
Hereโs the formula I tried: <<Start:SUM(FILTER(โs0โ, [Category] = RECEIVE))>> <<KG>> <<End>>
No luck though, as this is the error I get. I have little experience in using REF columns so I canโt really figure out where Iโm going wrong and what I need to change.
Iโd really appreciate the help guys, as I know this will be a very useful thing to know going forward when it comes to making reports inside of attachment templates.
Kind Regards,
D
Solved! Go to Solution.
Others are much better at expressions than I am. Hopefully, one of them will respond.
I am not sure why your expression begins with a Start expression. In a workflow template, you use a Start expression to format a set of rows. The value following Start should return the key values of the rows you want to format.
Have you tried simply placing your existing expression between << and >> in the workflow template?
We use the same expression system everywhere including workflow.
You may run into issues because the โcurrentโ record in the workflow template may not be the same as in your app, but the expression syntax is the same.
Others are much better at expressions than I am. Hopefully, one of them will respond.
I am not sure why your expression begins with a Start expression. In a workflow template, you use a Start expression to format a set of rows. The value following Start should return the key values of the rows you want to format.
Have you tried simply placing your existing expression between << and >> in the workflow template?
We use the same expression system everywhere including workflow.
You may run into issues because the โcurrentโ record in the workflow template may not be the same as in your app, but the expression syntax is the same.
It works Phil. Wow I just want to say thank you so much, youโve really done a great thing for me Today. I didnโt actually realize you could use formulas like this straight into attachment templates.
User | Count |
---|---|
39 | |
35 | |
29 | |
23 | |
18 |