Create a generic flow in Power Automate - sharepoint

I am a beginner to Power Automate and currently I am working on creation of flows.
Presently I worked on a flow to generate a PDF for a particular SharePoint list item on the click of a button in PowerApps. I have 2 lists in my site and I created 2 separate flows one for each SharePoint list. Presently I have only 2 lists but I may have 20 lists at a later point of time. Since this flow should be implemented for every list, my understanding as of now is to create 20 different flows for each list.
Is there a way to create one generic flow that will be applicable for all 20 lists in this scenario? If so kindly help.

Yes, this possible. (Please note that I enabled the Experimental Features for Power Automate - this changes the way you enter expressions and dynamic content)
Add an "Get Lists" action to your flow. The name is pretty self-explanatory.
I assume you used a "Get Item" action in your flow to select the item you want to convert to PDF.
Add "Get Item" to your flow, but now select "Add custom item" for your List Name.
Enter one of the outputs from "Get Lists" as Dynamic Value.
This will wrap the Get Item action in a "Apply to each" loop.
Enter DisplayName from "Get Lists" as Dynamic Value via "Add a custom item" for List Name" again
This should do the trick!

Related

How to retrieve value in selected SharePoint list item column

In a SharePoint list, I have a column that holds a foreign key ID to another list. For example:
list teachers
list classes with foreign key column teacherID to teacher item
I am trying to create a Power Automate flow that starts with a SharePoint "For a selected item" in classes and then modifies the referenced teacher list item.
"For selected item" in classes
Modify teachers item referenced by classes.teacherID
All(!) I need to do is get the value of teacherID, but that has turned out to be incredibly difficult. How can I do this? I'm new to Power Automate so any suggestions appreciated.
What I've tried:
Created a second action to email me output from the first action (because I don't know any other way to "debug" or "watch" this). Added many different types of Dynamic content and expressions to the email body. teacherID never appears. It is not in the list of Dynamic content fields. I cannot find in expressions tried e.g. triggerBody, trigger, output, actions('For a selected item') (which is an error for some unknown reason but I'm not trying to understand why at the moment). In the JSON, all I have been able to retrieve so far is ID, itemURL, fileName, FileId (which looks the same as ID).
My next thought was, okay, maybe "For a selected item" doesn't have access to the other list columns, but maybe "Get item" does. So, I inserted a "Get item" (singular, not "Get items) but this frustratingly did not make any difference.
What I am trying to do should be very simple and straightforward. The documentation is sparse, and it sucks TBH.
If the lookup column name is teacherID, you should use teacherID Id in the flow to find the item in teachers
You could create the flow like this:
"For a selected item" in classes
"Get item" in classes
"Update item" in teachers

Task name is getting renamed with Activity using TFS 2018 and Excel

I am having backlog in TFS 2018 and I am using default template provided to create the tasks.
The template is having the 'Activity' drop down, while selecting the 'Activity' it is also renaming the Task Title. It is ok if I am adding the task using TFS.
Now, I am using the Excel to create the tasks in the user story.
Only problem is whenever I publish the list, it is renaming the Title of the tasks with Activity name.
For example, If I publish the following list, "My Task" will be renamed with "Requirements- Review" (Value in Activity Column) in TFS board under "My Userstory".
Is there anyway to disable this behavior while adding tasks using the Excel?
As per my understanding both Titles are required as it is creating the
Parent Child relationship. In Excel I am selecting Title 1 and
clicking on "Add Child" and it is creating Title 2 column.
Actually we do not use this kind of way to add a nested list of work items( Parent Child relationship)
For example, you should first convert your flat list to a tree list by adding a tree level.
Enter titles for backlog items under Title 1 and for tasks, under Title 2. Also, select the corresponding work item type for each. Here we specify Task.
Publish your worksheet and the ID 95 is new created through Excel. In the background, parent-child links are created for each task listed.
As you can see in web portal, the new create task is list properly and title do not change and activity is also right.
More details please take a look at this official tutorial-- Bulk add or modify work items with Excel

How to populate a site column from a list to another list?

I have defined a couple of lists for capturing registration details of the user. There is a list for holding personal details of the user and there is another list which holds professional details of the user.
The two lists are used over two different pages in which name and ID both are required.
How do I get the name and ID populated automatically into the professional list from personal list so as the user doesn't have to fill the similar information twice?
Is it possible without doing any coding stuff?
This little control may help you
http://cascddlistwithfilter.codeplex.com/
Basically you would link the first Cascading drop down control to your user details list and the field name. The second drop down would then filter the users ID so the user can select that.
I have used this before and it can be a pain in the backside to configure but when it's there it is so very powerful and useful.
It's not fully automated but i'm unsure how you would get any closer with a bespoke event receiver.
Create the custom form there, you have keep some text box with the refresh button, so when ever you fill the user id and press the refresh button. You need to right small logic to bring the user from the the source list.
Or you can use the personal details id as look up column in the prop list so you will get the id and select the id and do refresh. Anyway you have right the logic in your custom form code.

Filtering a sharepoint list in infopath without Code

I am creating a browser enabled form and I would like to filter the results from a sharepoint list based on user input. if the user searches for the business unit "A" I would like a list of all locations that have a business unit of "A".
I have achieved this using code but the chaps that do the deployment want the from done without form code. can this be done and if so how?
I am using sharepoint 2007 and infopath 2007
my only real thought would be to create a web service that queries the SP list
I have looked to of solved the issue now.
I added a repeating section with controls on the form based on the data connection to the SP list. I then added conditional formatting on the repeating section to hide the control where business from data source does not equal search key word on the form.

In SharePoint, how can the "Issue ID" column of an issues list be included in the detail form (DispForm.aspx) and/or alert emails?

We've created a pretty standard issue tracking system based off of SharePoint's template with just a few extra columns. On the list view (AllItems.aspx), the first column is called "Issue ID" and has a number. Our developers and QC use that number in discussions. However, that number doesn't seem to want to show up on the detail form (DispForm.aspx) nor in the alert email.
Can this field be included in at least one of these communication methods? If so, how?
Thank you.
We did something similar and used workflow via SharePoint Designer to copy the ID field into a field called "Issue Number". The workflow gets triggered automatically on Create / Edit (we included edit because the field can be modified by the user on the edit form and if that happens we want the number refreshed with the actual ID).
Before you create the workflow in SharePoint Designer, you need to add a column called "Issue Number" to the list you want to tweak.
List item
Open Sharepoint Designer
List item
Click File New -> Workflow
Give a name for the workflow
a. select the list from the dropdown
b. Uncheck Allow this workflow to be manually started and check automatically start on new and change then press Next
Give the step a name like "Assign Issue Number"
Create a Condition
If Compare a field -> If Issue Number not equals Current_Item:ID
Create an Action
Update List Item -> Set Issue Number to Current_Item:ID
Press Finished and test out by creating a new issue.
*The Issue Number will appear on the form and if you have emails setup to notify on assignment it will appear in the reassigned template.
*It will not appear in the created email confirmation because the workflow gets triggered after that email was executed.
I just added the issue ID using a total of 4 characters. Create a new column, set it to a Calculated column, in the formula type [ID]. Voila! The ID is now in your detail view.
The ID link returned the for me, however, the work around which sufficed for me was to enter 'Created' in the Calculated Column formula and ensure it is set at date and time. That then creates a unique idenity (unless you receive more than 1 list update per minute) than can be viewed in the email alert message

Resources