Skip to main content

Notifications

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
 
  • GF-18061803-0 Profile Picture
    13 on at
    Electronic reporting : How to read a container ?
    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 !
     
  • Verified answer
    Martin Dráb Profile Picture
    232,968 Most Valuable Professional on at
    Electronic reporting : How to read a container ?
    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
    Electronic reporting : How to read a container ?
    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.
     
  • Martin Dráb Profile Picture
    232,968 Most Valuable Professional on at
    Electronic reporting : How to read a container ?
    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
    Electronic reporting : How to read a container ?
    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
    232,968 Most Valuable Professional on at
    Electronic reporting : How to read a container ?
    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.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,206 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,968 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans