Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Greetings,
Is there a way to tell Forena to link a column conditionally, depending on some other data in the report? In my report some rows have detail data and other don't. I'd like the users to be able to click the ones that do and link them to a new report with the data.
Thanks!
Comments
Comment #1
metzlerd CreditAttribution: metzlerd commentedYes, there is.
You can add an frx:if= attribute to any tag with an expression that references a column. For example:
Hope that helps.
Comment #2
msquires CreditAttribution: msquires commentedThanks for the quick response. I'm trying to evaluate this:
and its returning both. I must be messing something up?
Comment #3
msquires CreditAttribution: msquires commentedI got it I think, thanks. I guess you can only do null vs. not null?
This worked for me:
Thanks!
Comment #4
metzlerd CreditAttribution: metzlerd commentedYes, it only tests null or non null BUT it tests it with xpath expressions. So technically you can get quite a bit of value based checking. Consider the following example:
The above snippet would only present if the type field in the sql query were "article".
Glad you got this working.
Dave
Comment #5
msquires CreditAttribution: msquires commentedThanks for your help Dave!
I should also mention a small thing that threw me for a loop for a couple of minutes, the URL I was linking to had a parameter in it so I had to replace the "&" with
&
before it would save correctly, I really was kicking myself after I figured that one out :)Comment #6
metzlerd CreditAttribution: metzlerd commentedSeems answered so closing.