Create relationship dynamic view
Fix syntax errors