Hi,
Please help with this. I tried to create an email template, upon adding it, it will automatically send an email to the recipient. My problem is the second table(reference table) on my template did not show on the email content that the recipient has been received. Please suggest what would be the correct formula/expression for this.
I m not sure your table schema, but this expression is causing an issue.
This expression should be returning NULL value for the moment, even your expression is โvalidโ
Yes, it returns a null value for now.
P3 Demand - Child table that links to Demand table thatโs why column name is โRelated P3 Demandsโ
I want to get the value of the child table (Related P3 Demands) and reflect it on the email content.
Could you please suggest the correct expression?
Could you share the screenshot for that table, where we see the column configs.
Please see attached image.
Sorry , what i mean was P3 demands table.
On your original expression, what do you want to do with 5 at the end?
Top 5 or so?
For Controlling Record Order . to display 5 items only.
how do you define โ5 onlyโ?
Just display 5 rows max?
i m puzzled as well, โRecord Orderโ
yes, to display 5 rows max
For example I have 10 rows on my P3 Demands table, only 5 rows will reflect on the email.
The most latestly added 5 rows or something like that?
yes, the most latest added 5 rows if it is possible
On your screenshot, there is no column to hold date or datetime values, so you can rely on only row_number field.
how about this expression:
<<Start:TOP(ORDERBY([Related P3 Demands],[_RowNumber],TRUE),5)>>
is it correct?
Try it out now with it.
If it does not work then try this.
<<Start:TOP(ORDERBY(Select([Related P3 demands][P3 Demand ID],TRUE)),[_RowNumber]),5)>>
Itโs not working
After I posted, i amended my typo, so
<<Start:TOP(ORDERBY(Select([Related P3 demands][P3 Demand ID],TRUE)),[_RowNumber]),5)>>
is what you tried?
You need to define how you decide how to judge 5 rows based on your conditions.
Based on some dates, or max values etc. Your are missing that definition to get the rows out.
yes, i tried that expression and i got an error.
Failed: Action not performed because 2 errors are present. Error: Workflow rule โSend Email to Initiator for New Demandโ action โSend Email Notification to Initiatorโ Body template. Expression โTOP(ORDERBY(Select([Related P3 demands][P3 Demand ID],TRUE)),[_RowNumber]),5)โ is invalid due to: Expression โTOP(ORDERBY(Select([Related P3 demands][P3 Demand ID],TRUE)),[_RowNumber]),5)โ could not be parsed due to exception: Number of opened and closed parentheses does not matchโฆ Error: Workflow rule โSend Email to Initiator for New Demandโ action โSend Email Notification to Initiatorโ Body template. Start expression โTOP(ORDERBY(Select([Related P3 demands][P3 Demand ID],TRUE)),[_RowNumber]),5)โ should generate a List of Ref values. Please verify that it generates a List and that the contents of the List are Ref values. Ref values should come from the โKeyโ column of the referenced tableโฆ
tried this formula:
<<Start:TOP(ORDERBY(Select([Related P3 demands][P3 Demand ID]),TRUE),[_RowNumber],5)>>
and I got an error again:
Failed: Action not performed because 2 errors are present. Error: Workflow rule โSend Email to Initiator for New Demandโ action โSend Email Notification to Initiatorโ Body template. Expression โTOP(ORDERBY(Select([Related P3 demands][P3 Demand ID]),TRUE),[_RowNumber],5)โ is invalid due to: SELECT has invalid inputs. Error: Workflow rule โSend Email to Initiator for New Demandโ action โSend Email Notification to Initiatorโ Body template. Start expression โTOP(ORDERBY(Select([Related P3 demands][P3 Demand ID]),TRUE),[_RowNumber],5)โ should generate a List of Ref values. Please verify that it generates a List and that the contents of the List are Ref values. Ref values should come from the โKeyโ column of the referenced tableโฆ
I mean this expression.
If it does not work, i m running out my help, hopefully the other community member would help you out.
yes i tried it but i got an error.
Failed: Action not performed because 2 errors are present. Error: Workflow rule โSend Email to Initiator for New Demandโ action โSend Email Notification to Initiatorโ Body template. Expression โTOP(ORDERBY(Select([Related P3 demands][P3 Demand ID],TRUE)),[_RowNumber]),5)โ is invalid due to: Expression โTOP(ORDERBY(Select([Related P3 demands][P3 Demand ID],TRUE)),[_RowNumber]),5)โ could not be parsed due to exception: Number of opened and closed parentheses does not matchโฆ Error: Workflow rule โSend Email to Initiator for New Demandโ action โSend Email Notification to Initiatorโ Body template. Start expression โTOP(ORDERBY(Select([Related P3 demands][P3 Demand ID],TRUE)),[_RowNumber]),5)โ should generate a List of Ref values. Please verify that it generates a List and that the contents of the List are Ref values. Ref values should come from the โKeyโ column of the referenced tableโฆ
Sorry, i made a typo probably.
this should be the one.
<<Start:TOP(ORDERBY(Select([Related P3 demands][P3 Demand ID],TRUE)),[_RowNumber],5)>>
OR
<<Start:TOP(ORDERBY(Select([Related P3 demands],TRUE)),[_RowNumber],5)>>
Hi,
Still not working.
<<Start:TOP(ORDERBY(Select([Related P3 demands][P3 Demand ID],TRUE),[_RowNumber]),5)>>
How about this instead?
Or
<<Start:TOP(ORDERBY(Select([Related P3 demands],TRUE),[_RowNumber]),5)>>
doesnโt work
What if happens, if you place this expression into VC on the parent table? Get the correct set of rows?
Nothing happened. The result is still the same.
No more practical offers from my side. I only can suggest that you use virtual column to test your expression. Just start test with pieces of your whole expression to find out the root cause of the problem, typical debugging approach on your own.
I solved it! Thanks for all the recommendations
Good to hear you get out of the maze finally.
Consider removing everything else in your template (or create a new template solely for testing) while you figure this out, to ensure there isnโt something else confusing the matter.
User | Count |
---|---|
43 | |
30 | |
24 | |
23 | |
13 |