Dynamic name field in Reports

Hi,I’ll explain what I’d like to do:
in the Reports module I would like that when I enter the name, this field contains the value of one of the set parameters, like it happens, for example, in email templates, where you enter $field_name and its value appears.
Is this possible? How?


Sorry, i’m not 100% sure I understand what it is you’d like to achieve with reports/$field_name type parameters

The Reports module should populate the fields you’ve entered:

With valid data:

Other than that, I can’t think of an OOTB way to use the Email Template’s $field_name functionality in conjunction with reports.
It sounds like it’d be fairly custom, unless i’ve misunderstood?

Would you be able to give more info/screenshots to clarify?

I would like the contents of the “Valore” field (Account_name) to appear in the name of the Reports in the top left-hand corner


Thanks for the clarifications

So, just to double check, do you want either:

  • The value that the user enters in the Condition/Parameter for “Account Name” to become the Report’s Subject
    (ie: If the User has a Condition: “Account Name” = “SalesAgility”, Then the Report Name becomes “SalesAgility” )

  • Or, the Account Name results from when the report has run to show in the Report’s Name?

I’ve had a look into it, and I both of these might be possible through Logic Hooks, though it’d get a little complex

I’m unsure if you could get the value submitted via the Detailview “Parameter” field, and then update the “Name” on the Detailview on the fly with this, but grabbing it from the “Conditions” when the Report is Saved should be more doable.

Perhaps if someone is more familiar with js/jquery, they could suggest a solution?

Additionally, with the latter option, It could get quite messy if multiple Account records return, as well as being more complex to do.

If you’d like to try a logic hook, I’ve previously written some brief steps on creating Logic hooks here:Change user when isn't administrator

As well as there being some information on our docs page:https://docs.suitecrm.com/developer/logic-hooks/

And, in the logichook file, something like:

Might be a good starting point, as it would grab the Conditions set by the user, on Report Save
(Which could then be manipulated via code)

Let us know if you have any further clarifications or need any assistance! :slight_smile:

Hi John,
sorry I’m only responding now, but I was trying to see if I could work it out.
I was hoping that it was not necessary to intervene via code, as I had said in the first email, I thought it was enough to insert a variable as it happens in email template or pdf template. Alright, I’ll try your suggestions if there is no alternative. Thanks

Hey fab,

Thanks for getting back,

I think the functionality just isn’t there for variable-replacement outside of Emails/PDFs, I’m afraid :slightly_frowning_face:

Though it could be handy to have, so do feel free to raise it as a suggested feature on the Github Repo!

Anyways, please let us know how you get on!
Hopefully you can come to a solution!