Pergunta

I have to somehow synchronize several lists. I started off with my previous question here:

generate lists from another

To wrap it up, my current problem is, to find out, if the title from my master list is already present in one of my autogenerated lists, or not. Everything else (adding elements to my lists depending on column contents, etc.) works.

I tried to follow the instructions as well as possible. But I'm stuck when I should enter the infamous @equals(length(body('Get_items')?['value']), 0) as a condition for branching. I never get to the "complex mode" which is referred to everywhere. Step 1

Step 2

Step 3

Here is where I'm stuck. Where can I continue? Where is the window or field to put the formula? Or to put it the other way: How can I construct the formula by mouse clicks?

Update

I think I got a little bit further, but stuck again. I was able to add the filtering. Here's the next hindrace:

condition entered but fails That's my error message: Error message

It loosely translates: "Error while checking the template: 'Get_Items' referenced in 'input' in action 'Bedingung_3' is not defined in template"

Where do I have to look next?

Foi útil?

Solução

In your Get Items action (which I believe is your elemente abrufen action), you need to specify an ODATA filter query (I believe the German equivalent is abfrage filtern). Set that value to Title eq <<insert Flow reference to original item's Title>>.

Then in your first Condition after the Get Items, you should use dynamic "Expression" (sorry, I don't know what the German equivalent for "Expression" is, but it is the second tab in the "Dynamic Content" box that pops up when you edit a value) to specify equals(length(body('Get_items')?['value']), 0). Although this formula is checking that there are zero items, you actually probably want to validate that your query returned exactly one item equals(length(body('Get_items')?['value']), 1), then, rather than looping through them all (Auf allen anwenden), you just want to look at that first item body('Get_items')?['value'][0]. Maybe initialize a Object type variable earlier, so that in the condition block you can Set Variable to body('Get_items')?['value'][0].

Outras dicas

According to your description, i will suggest not using expressions. Use the dynamic content directly will make you less confused. It seems you are referring to examples using advanced mode. And i assume you want to check if the item title in your master list equals to any of item in another list.

A simple demo will be like this. A trigger which will get information from the item in the master list, then add a get items action which get all items in the auto-generated list. Then add a condition. Flow will automatically move the condition block into a "apply to each". It will help you to compare with each item in the list you fill in the "get items" action. Then add the required actions in yes/no branch. enter image description here

Note: This demo can check if the title of new item in the list "approval list" exist in the list "ct1"

In the condition block, the Title on left side is the dynamic content title from the trigger "when an item is created", and the title on the right side is the dynamic content title from the action "Get Items"

I hope this demo will make you less confused.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a sharepoint.stackexchange
scroll top