cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LoGoBro
Regular Visitor

Select file in a subgrid and convert to PDF

Hi all!

I have a model-driven app with an associated SharePoint document library.

In the model-driven app, there is a Documents subgrid in the form for a related entity. I would like to select a specific document and be able to trigger a flow that converts the document to a PDF-file.

However, when I use the Dataverse trigger "When a row is selected", it doesn't seem to pick up any information, and I cannot figure out why... I've tried to place the flow inside and outside of the solution, but it doesn't make a difference,

 

Does anyone have any ideas?

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @LoGoBro ,

 

Thank you for confirming on this. Would it be possible to introduce custom button on this grid. That way you will be able to pass GUID of the selected record and do further operation to get the record from Sharepoint and convert to PDF ?

 

Thanks

View solution in original post

5 REPLIES 5
ManishJain
Solution Sage
Solution Sage

Hi @LoGoBro ,

 

have you created flow for that particular entity , if not first create it and try doing the same upon creation.

 

Thanks

LoGoBro
Regular Visitor

Hi @ManishJain,

 

Thank you for replying! I'm not entirely sure what you are asking, so let me explain what I have tried so far.

 

I have an entity called "Requests" that I have set up SharePoint Document Management for, so I also have a SharePoint Document entity.

On the Request form, I have a subgrid that shows the related documents for that particular Request record. The grid works perfectly in terms of viewing and uploading documents. What I would really like to do is to click on a specific document in that subgrid and run a flow or a workflow to convert it into a PDF.

 

So far, I have tried a couple of things:

 

First of, I have created a Flow using the legacy "When a row is selected" trigger (there's no replacement for this one yet, as far as I can tell):

 

LoGoBro_0-1643362852487.png

When I run the flow it triggers well enough:

LoGoBro_2-1643363192638.png

 

But the "value" input for the compose action seems like it is empty:

 

LoGoBro_1-1643363140882.png

It seems like no information is being passed in the trigger?

 

I also tried creating a workflow, which I am a total newbie at, so I may have made mistakes here, but it did give me an interesting error code (10 ways to know you're in IT: "Oooh, that's an interesting error code" 😁)

The workflow:

LoGoBro_3-1643363480319.png

 

The error code:

LoGoBro_4-1643363690291.png

My user has the system administrator role and the document definitely still exists.

 

So, that is where I am at. Do you have any suggestions?

Thanks in advance!

LoGoBro
Regular Visitor

Ugh! Just found this (and wow did I have a hard time finding this nugget of delight):

LoGoBro_0-1643372090451.png

So the issue is that the SharePoint Documents is actually virtual table, so it returns an empty array. *Sigh*.

I assume you can't make it into a non-virtual table?

 

I wonder if I can make it work, if I keep the document in the Notes entity. Will find out...

Hi @LoGoBro ,

 

Thank you for confirming on this. Would it be possible to introduce custom button on this grid. That way you will be able to pass GUID of the selected record and do further operation to get the record from Sharepoint and convert to PDF ?

 

Thanks

LoGoBro
Regular Visitor

Hi @ManishJain,

 

Thank you, that sounds like it might be just the thing. I haven't tried creating a custom button before, so that's something new and exciting to work on!

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (2,367)