Hello. I have a SharePoint list to track things assigned to different departments. When a user submits a request for approval of a new item a flow fires and has been working until we made an update to capture department. I want to get their department and then mark their department column with an X. We did it this way rather than have a department field because an item can apply to multiple departments and the users prefer the view by department rather than a multi-department single field.
I've tried multiple variations of this formula. For example, if I choose this formula when I save the flow I get "The input parameter(s) of operation 'Create_item-1' contains an invalid expression(s).
Formula: ifoutputs('Get_user_profile_(V2)')?['body/department']='SEO','X',ifoutputs('Get_user_profile_(V2)')?['body/department']='Earned Media','X',null
If I use this formula I get "The expression is invalid" when I try to update the formula.
Formula: if(outputs('Get_user_profile_(V2)')?['body/department']='SEO','X',if(outputs('Get_user_profile_(V2)')?['body/department']='Earned Media','X',null))
Can anyone help me understand what I am doing wrong here?