Condition Check for Material Request Item Group in Workflow Transition Condition

Hi Everyone,

I need assistance with writing a conditional statement in workflow transition to check if any MaterialRequestItem associated with a MaterialRequest has an item_group field with the value “Information Technology”.

I want to check this condition in my code, but I’m not sure how to write the correct syntax. Could you please provide an example of how to achieve this?

what I have tried so far but does not work.

Information Technology' in [item['item_group'] for item in doc.get('items', [])]

Thanks in advance

@maliknaqibullah refer this Workflow condition, loop through child table

1 Like

@maliknaqibullah please write this condition and check

“Information Technology” in frappe.db.get_all(“Sales Invoice Item”, {“parent” : doc.name}, pluck =“item_name”)

1 Like