I have the following expression in a report template. Itโs causing an error, but I donโt know what it is because it gets cut off in the log and I canโt see the whole message. Is it because Iโm trying to reference a reference? If so, how do I get to that data? I basically need to look at a field (date) within a referenced table (Level โXโ Assessment) of a referenced table (trainees, whose key value is โRandomIDโ) . Here is the expression:
Last Assessment: <<ifs([RandomID].[Current Level]=1,[RandomID].[Level 1 Assessment].[date],[RandomID].[Current Level]=2,[RandomID].[Level 2 Assessment].[date],[RandomID].[Current Level]=3,[RandomID].[Level 3 Assessment].[date])>>
It is also worth mentioning that not every trainee is going to have an assessment in existence for each Level. This doesnโt present a problem within the app, because it just doesnโt show us a link to the โbadโ ref (the table is ready-only so the detail view only shows the โactiveโ refs)โฆ Just in case this presents a problem in this situation?
Solved! Go to Solution.
Yep, the problem is the dereference chain.
Please post a screenshot of the error.
Quite possible. Dereference chains (e.g., [RandomID].[Level 1 Assessment].[date]
) are not (yet?) supported.
Urgh. I really need to be able to โreferenceโ two levels deepโฆ This is going to be a big issue with my app.
At any rate, hereโs the error verbatim (I figured out if I highlight it will scroll even though thereโs no scrollbar)โฆ Seems it may be the โreference to a referenceโ, but the message is clear as mud.
โErrorsโ: โError: Report โTT report -Weeklyโ action โAction 1โ Body template. Expression โifs([RandomID].[Current Level]=1,[RandomID].[Level 1 Assessment].[date],[RandomID].[Current Level]=2,[RandomID].[Level 2 Assessment].[date],[RandomID].[Current Level]=3,[RandomID].[Level 3 Assessment].[date])โ is invalid due to: Error in expression โ[RandomID].[Level 1 Assessment].[date]โ : Unable to find column โRandomID].[Level 1 Assessmentโ.โ,
Yep, the problem is the dereference chain.
I actually just figured out a way to โcode around the problemโ! Thanks for your help.
Care to share?
Sure. I ran the portion through a select() so that I didnโt have to ref two levels โdeepโ.
User | Count |
---|---|
41 | |
36 | |
28 | |
23 | |
16 |