Can I create a non-persistable entity using microflow at runtime?

0
I want to create a non-persistable entity based on selected attributes of another entity using a microflow. After that user can generate excel file for those selected attribute. Is there any way to fetch only selected attributes from persistable entity and copy into another non-persistable entity at runtime?   Hope there will be an answer for this question. It’s an urgent requirement. Thanks in advance.
asked
1 answers
4

The Excel Export module has the base functionality you need. I would recommend you pre-build an export template with all of the fields you might want on the report. Look at the Domain Model of the Excel Export module to understand how that is stored.

Then, your UI will let the user pick which columns to export and choose sorting. That could be done however you like. Once the user moves on from that page, your microflow should do the following:

  • Find the existing export template
  • Duplicate it, but remove the columns that the user doesn’t want
  • Set the sorting according to the user’s selection (this is already a setting on the template / in the template data model)
  • Set aggregates (I’m not certain if the module has this feature already)
  • Run the excel export with your “new” temporary template
answered