cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Andy77Kl
Frequent Visitor

Document library selected item flow for content type

Hello.

There's any possibility to show flows only for specific content type, or on specific view (I can create view for this content type)?

I want to create and run flows for selected items and have possibility to start them only on that content type.

1 ACCEPTED SOLUTION

Accepted Solutions

@Andy77Kl I must apologise, I gave you incorrect information in my previous post when I said it wasn't possible to show the approval button on items in a list/library depending on their content type. It is.

In the image below I have formatted the Content Type column of my library with JSON code and have set it so that the approval button only display if the Content Type column equals Policies. Otherwise the button is hidden:

contentType-Format.png

The syntax of the JSON formatting is:

 

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "button",
  "txtContent": "Send for Approval",
  "customRowAction": {
    "action": "executeFlow",
    "actionParams": "{\"id\": \"355cfb96-ddc5-4911-956c-9705f7557ee5\"}"
  },
  "style": {
    "background-color": "#468259",
    "color": "white",
    "visibility": "=if(([$ContentType] == 'Policies'),'visible','hidden')"
  }
}

 

You need to use the internal name of the column, Content Type, not the display name Content Type.

Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks. 

 

View solution in original post

9 REPLIES 9
burgett94
Resolver II
Resolver II

Hello @Andy77Kl 

 

Just to be clear, are you asking for a view or flow to provide a summary of only Word documents, Excel spreadsheets, Pdfs etc?

 

Thanks

 

Bradley

Best regards,

Bradley
If this post helps, then please consider Accept it as the solution to help the other members find it more

@burgett94  - I'm asking for a flow which I can start from selected item action menu. I want to have different flows depending of item content type (not all in one place) - different for document sets, different for documents.

Option can be possibility to have different flows in views - I can create view for document sets, other view for documents.

Hello @Andy77Kl 

 

If you use the action "Get files (properties only)" you can get the File name with extension which will return as "Doc1.docx".

 

You can then use an expression to select the text after the full-stop leaving only the file extension.

 

From here you can use a condition to say "File Extension equals docx then X" and in false again "File Extension equals xlsx then Y" and repeat as necessary.

 

Thanks

 

Bradley

Best regards,

Bradley
If this post helps, then please consider Accept it as the solution to help the other members find it more

@burgett94, thanks but I want to see flow "Rezerwuj maszynę" only on dokument sets (two first items on screenshot), not on files in library. Now I see that flow on every item in library, which is confusing (file isn't a machine);

That's my main question;Adnotacja 2020-02-11 122234.png

 

Hi @Andy77Kl ,

 

For a selected item/file, Flow is triggered only when the item or file is selected.

 

So the user can directly select the file with the expected content type and trigger Flow. No other configuration seems to be required.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-bacao-msft,

I think still we don't understand each other:

But I don't want to see 'Rezerwuj maszynę' flow when I open action menu for a file - I want to see this flow only when I do that on document set action menu. this flow ('Rezerwuj maszynę') is only valid for that specific document set, not for all items in library.

So if I click action menu for document set I want to have some flows (dedicated for this content type) and others when I click action menu on a file.

Hello All.

Anyone can help me? It's possible or not?

No it's not, it's there for every item in the library. To achieve what you want you'd need to put the document sets or the files into a different library.
Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

 

@Andy77Kl I must apologise, I gave you incorrect information in my previous post when I said it wasn't possible to show the approval button on items in a list/library depending on their content type. It is.

In the image below I have formatted the Content Type column of my library with JSON code and have set it so that the approval button only display if the Content Type column equals Policies. Otherwise the button is hidden:

contentType-Format.png

The syntax of the JSON formatting is:

 

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "button",
  "txtContent": "Send for Approval",
  "customRowAction": {
    "action": "executeFlow",
    "actionParams": "{\"id\": \"355cfb96-ddc5-4911-956c-9705f7557ee5\"}"
  },
  "style": {
    "background-color": "#468259",
    "color": "white",
    "visibility": "=if(([$ContentType] == 'Policies'),'visible','hidden')"
  }
}

 

You need to use the internal name of the column, Content Type, not the display name Content Type.

Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks. 

 

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,172)