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
Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Top Solution Authors
Users online (5,694)