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

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
Highlighted
Community Support
Community Support

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
Regular Visitor

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?

Highlighted
Community Support
Community Support

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

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

Users online (7,596)