cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
User_sen
Level: Powered On

Create a Page in OneNote if the List has no Item with the same Company Name

We have a contact list in SharePoint (created from Outlook) and we want to create a worflow, which:

 

by creating a new item of the list 

 

1. proves, if there already exists an item with the same company name * 

2. if yes - do nothing

3. if no - create a new page in the section in OneNote

 

* company name is a column in SharePoint 

 

I have programming knowledge, but I don't understant, how it works in Flows, so it would be really great, if someone could help me.

 

 

3 REPLIES 3
Community Support Team
Community Support Team

Re: Create a Page in OneNote if the List has no Item with the same Company Name

Hi @ User_sen,

 

Could you please share more details about the sharepoint list?

 

I have made a test on my side, and I have created a sharepoint list with a Single line of text column "company name".

You could refer to screenshot below to create the flow:

Capture.PNG

Capture.PNG

 

 

Note:

The first value of the Condition choose the "company name" dynamic content of the trigger "When an item is created" and the second value of the Condition choose the "company name" dynamic content of the action "Get items".

 

When an item is created in the sharepoint list, and if there already exists an item in the list with the same company name, the result of Condition2 would be true and the flow would do nothing as screenshot below:

Capture.PNG

 

 

When an item is created in the sharepoint list, and if there already exists an item in the list with the same company name, the result of Condition2 would be false and the flow would create a new page in the section in OneNote as screenshot below:

 

 

 

 Capture.PNG

 

Regards,
Alice Zhang

Highlighted
User_sen
Level: Powered On

Re: Create a Page in OneNote if the List has no Item with the same Company Name

Thank you for your answer and your time.

 

I have tried all these, but the first if-condition doesn't work properly, it returns always false(by comparing company names), although I made everything as you have described (i checked many times).

 

Our list is a contact list, which is synchonized with Outlook. 

 

Do you have any ideas?

Community Support Team
Community Support Team

Re: Create a Page in OneNote if the List has no Item with the same Company Name

 

Hi @ User_sen,

 

Could you please share a screenshot and more details of the of the expression of the Condition in your flow?

 

Note:

The first value of the Condition choose the "company name" dynamic content of the trigger "When an item is created" and the second value of the Condition choose the "company name" dynamic content of the action "Get items".

 

The screenshot of my Condition as below:

Capture.PNG

 

The expression as below:

@equals(triggerBody()?['company_x0020_name'], items('Apply_to_each_2')?['company_x0020_name'])

 

Please check if you have created a new item and it's company name is already exists in an item in the list.

 

 

Regards,
Alice Zhang

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Users Online
Currently online: 207 members 3,190 guests
Please welcome our newest community members: