SOLVED

How to trigger a flow when a specific custom filed data is added or changed in project online?

Copper Contributor

ex: In Power automate the flow will run based on this trigger ,when  a project is published.  I had a custom filed Project Level Entity, custom filed name is Quantity that is  tagged in a project detail page.

Whenever the end user enter the data in Quantity custom filed ,flow has to trigger based on this filed.

Ex: Quantity :10 (flow has to run)

     if the Quantity value gets changed

    Quantity : 20 (flow has to run)

I am creating a project snapshot using Sp list & power automate. I just want to track that custom filed data in project online.

7 Replies
best response confirmed by Anil_kumar (Copper Contributor)
Solution

Hello @Anil_kumar ,

There isn't a Power Automate flow trigger for a field change for Project Online, all you can do is fire the flow when the project is published. If you are tracking the data in an SP list, you could compare the data in the project and the latest record in the SP list to see if the field value changed or not.

Paul

Thanks for the response & for the suggestions @Paul Mather ,

In power automate, I am facing some logical issues for this flow. The flow shows successfully run but the condition is not executing Paul. Please suggest the steps for this flow, That would be a great help d1.pngd2.png

Hi @Anil_kumar ,

This will be quite tricky to debug via the forum. How come you are doing to calls to SharePoint then doing two foreach loops - one for each data set returned from the SP actions? If you are comparing Project A from PWA and Project A from the SP list, I would expect just one SP action to get the latest record from the SP list for Project A so you can compare that?

Paul

Sorry for the late response paul,
This 2nd question will fit to this scenario.
If you are comparing Project A from PWA and Project A from the SP list, I would expect just one SP action to get the latest record from the SP list for Project A.
In the flow what I did is ,for ReadallProjects action i used one apply to each action ,where as to compare each record in SharePoint list I used condition action ,but when I insert the SharePoint column name........the flow is automatically creating the another apply to each action. Here i am facing the issue.

Hello @Anil_kumar ,

What is ReadAllProjects querying / returning? What is the Get Items querying / returning? 

Power Automate will add in the Apply to each loop when the previous action returns an array of results and you are trying to use that dataset. "Get Items" assumes many items will be returned, hence the apply to each loop, where as "Get Item" will just return 1 item so no loop required. So you'd need to find the latest record for the published project from the SharePoint list, then compare that data with the live project.

Paul

Whatever you said is correct paul,
1. ReadallProjects(send an http request) returning the project level custom fields data
/_api/ProjectData/Projects()?$Select=ProjectName,Quantity
Ex: It returns 10 Projects from PWA
2. GetItems action returning the sharepoint list data .
Ex: It returns 5 row items
Projects Quanity
A 10
B 20
c 10
d 5
e 7
You are suggesting to use the Get item action , but in get item action we have to mention the SharePoint id right?That id i am taking form the get items action
Eventhough when i am taking the getitem returned column, the flow is automatically adding the apply to each 2 again.
I have to explore on the logical part paul. Thanks for the suggestions

Hello @Anil_kumar ,

That is correct, when using the "Get Item" action, you will need to pass in the list item ID for the project record from the SP list that you want to compare with the live project from PWA.

Paul

1 best response

Accepted Solutions
best response confirmed by Anil_kumar (Copper Contributor)
Solution

Hello @Anil_kumar ,

There isn't a Power Automate flow trigger for a field change for Project Online, all you can do is fire the flow when the project is published. If you are tracking the data in an SP list, you could compare the data in the project and the latest record in the SP list to see if the field value changed or not.

Paul

View solution in original post