web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Electronic reporting : How to read a container ?

(1) ShareShare
ReportReport
Posted on by 13
Hi experts,

I am trying to do an electronic report based on the table named BatchJob.
My problem is about the field named RecurrenceData which is a container. How can I use it in my report?

The only way I found to read the container is to bind it as follow:


But I would like to read each element of this container and I don’t know how to do it or even if this is possible.

Is it possible to do a "conpeek" in an electronic report?

Thanks in advance for your help.
Guillaume
 
  • Martin Dráb Profile Picture
    240,833 Most Valuable Professional on at
    The whole approach looks wrong to me. You shouldn't try to interpret the container by yourself by something like conPeek(). Instead, use the class that exists for this purpose: SysRecurrence.
     
    For electronic reporting, you can use a class as a data source, or put the data to a temporary table and use that.
  • GF-18061803-0 Profile Picture
    13 on at
    Thanks for your answer Martin.
    I already use the SysRecurrence class to get the recurrence pattern with the method getRecurrenceUnit().
    But I don't know how to get the count value (see screenshot below). My idea was to try to understand the container and find the value I am looking for. (I think I found all necessary explanations here https://community.dynamics.com/forums/thread/details/?threadid=641685a1-a924-412b-beef-8763049ef30b).

    So maybe the best thing to do, is to ask to my technical team to develop an extension of this class and then use a new method.
    Do you agree?


  • Martin Dráb Profile Picture
    240,833 Most Valuable Professional on at
    You can get the number from SysRecurrence::getRecurrenceUnitValue(). It returns a container; in your case, you're interested in the first value only. It's more complicated when you get into things like "the second Thursday each month"; you can look at SysRecurrenceBuild.defaultValue() to see an overview of what can be there.
     
    I would probably create a custom class (or a temporary table) and populate the data there with the help of SysRecurrence, rather than extending SysRecurrence as such.
  • GF-18061803-0 Profile Picture
    13 on at
    Unfortunately SysRecurrence::getRecurrenceUnitValue() returns a container and I don’t know how to use it in ER. It seems not possible for me. I was so close to finish my report without any custom class :-(
    Anyway, thanks for all the information you provided in this post, I will create a custom class with the help of my technical team and then I will use it in the report.
     
  • Verified answer
    Martin Dráb Profile Picture
    240,833 Most Valuable Professional on at
    How to deal with containers is exactly what we discussed in this thread.
     
    But if you're saying that the only problem you have is that getRecurrenceUnitValue() returns a container, simply add a method (in an extension) that calls getRecurrenceUnitValue(), extracts the number and returns it.
  • GF-18061803-0 Profile Picture
    13 on at
    The extension works as expected.
    So, the lesson learned is, in an electronic report, container must be used with a class method and not with an ER function.
    I think the idea is to put the logic of the container in a method that can be call everywhere, in another ER report, in a data entity, in another class…
    There is another interesting method: BatchJob. recurrenceText()
    Thanks for your help Martin !
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 495 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 432 Super User 2026 Season 2

#3
CU10121822-0 Profile Picture

CU10121822-0 366

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans