Derived state in application model

Why does this not work?

'Create Fulfilled In Shopify': stategroup = switch $ .'Sales Orders' .'Lines' ?'Fulfilled' ( 

I’m trying to derive the stategroup Create Fulfilled In Shopify in the interface from the stategroup Fulfilled under collection Lines, under collection Sales Orders in the model.

Your expression is missing the * operator for expanding the (collection of, I assume) Sales Orders:

switch $ .'Sales Orders'* .'Lines' ?'Fulfilled'