cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JoshInwood
New Member

Creating an item on List A to automatically create item on List B only if 2 different fields don't match any item in List B

Hi,

Hoping to get some help, i'm trying to setup a flow so that users can enter data on List A: "Staff Absence Form" and it automatically creates the item on List B: "Relief Management" using only the nominated fields. The issue i'm trying to resolve is that if an item already exists in List B which contains the same value in the "Staff-Out" column and "Date" Column as the values being imported from list A in columns "Staff Name" and "Date of Absence".

For example, the below image is of List B, now if i entered the same date and name in List A, i dont want a record created. However, if I created an item which had a different date and same name or same date and different name on list A  i would want that item to be created in List B.
4.png

I'm currently getting the following error code The expression "Staff-Out eq 'PERSONS NAME'" is not valid. Creating query failed.

clientRequestId: 96635ff5-861e-450c-ac2b-6813cdc370a4
serviceRequestId: 96635ff5-861e-450c-ac2b-6813cdc370a4

Something to note is the Staff-Out and Staff Name Fields are both "People" fields and not just plain text.
Below are photos of my flow configuration.

1.png2.png

3.png

 

Any help would be greatly appreciated. Im really not sure how to fix this.

1 REPLY 1
Hardesh15
Super User
Super User

@JoshInwood  "Staff-Out eq 'PERSONS NAME'"  if it is type of Person field you can not apply filter query directly in get items. You can use Filter array where you can compare column name from both the lists. OR create one more column let's say-EmailID and hide this column. In this column you can capture Sign-Out person email and later use this column in filter query.

Both solution are fine you can choose any one. 

Please 'Thumbs Up' the posts that helped you and 'Mark as Solution' if my post answered your question.

@Hardesh /Gopenly.in

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Users online (3,638)