I've got two lists; List 1 = Parent & List 2 = Child. The relationship between the two is one (Parent) to many (Child). The Child list has a lookup field to the Parent ID and the Parent list has a lookup field (count related) based on the Parent ID stored in the Child list. The intent here is to identify how many Child records are associated with each Parent ID. From a list view perspective, everything functions as designed.

I'm working on a Workflow that identifies integrity concerns when certain fields are missing. I know I can make these required fields in the list settings, but some of these fields are required when other field values in the list = X vs Y. My workflow is checking for these occurrences in a series of nested If/ElseIf's. My current roadblock is when I use the "If any value equals value". If Parent.Checkbox = "Yes" and Parent.Child Lookup Count = 0, then I want to create a variable that I will later embed in an email response. For the fields not incorporating the Parent.Child Lookup Count field, the workflow and automated email both function. Whenever I try to apply the same approach with the Parent.Child Lookup Fields, the workflow fails.

What I'm after:

In the Workflow Condition - If any value equals value: I need it to state: If Parent.Checkbox = "Yes" and Parent.Child Lookup Count = 0 Then Set Workflow Variable to equal "Blah blah blah."

1. I've tried hard coding a 0 (int) and "0" string.

  • If Parent.Checkbox = "Yes" and Parent.Child Lookup Count = 0/"0"

    2. I've tried creating a Workflow Variable called ZeroCount for both int & string and hard coding my 0/"0" there.

  • If Parent.Checkbox = "Yes" and Parent.Child Lookup Count = ZeroCount

    3. I've tried creating a Workflow parameter (int & string) and then setting the Workflow Variable ZeroCount to equal that.

  • ZeroCount (variable) = ZeroCountP (parameter)

  • If Parent.Checkbox = "Yes" and Parent.Child Lookup Count = ZeroCount

    4. I've tried creating a field in my Parent list and making the default value 0.

  • If Parent.Checkbox = "Yes" and Parent.Child Lookup Count = Parent.ZeroField

So far, no dice. I'm pretty new to this world and know I'm shooting in the dark, but I've exhausted my Google search efforts and was hoping someone could point me in the right direction.

| improve this question | | | | |
  • Have you tried check the value inside Parent.Child Lookup Count? You could use Write to workflow history, from there you could see what's the value store in those field. And use it in if condition – Ariwibawa Apr 5 '19 at 9:59
  • Thanks @Ariwibawa, I will explore to see what comes back. Thanks for the tip! – Christopher Unger Apr 5 '19 at 22:54
  • @Ariwibawa - Checked the Workflow status and the Internal Status message is returning: "The query to field Parent.Child Lookup Count/Child.Parent ID is not valid." – Christopher Unger Apr 10 '19 at 15:42
  • It seems this couldn't be archived by using that count related lookup column. You need to call REST API that will search child based on query (by parent) and insert it into dictionary, from there you could use count item in dictionary workflow action. Here's something you could check social.msdn.microsoft.com/Forums/office/en-US/… – Ariwibawa Apr 11 '19 at 8:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.