cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
smerchatn
Frequent Visitor

Lookup column and Select Action

I also noticed that when you are using 'Select' the lookup column does appear in the list, but it throws an error 

 

Details:

 

Item created trigger from a SharePoint 

Get Items

Select [dynamic contents shows the lookupcolumn ID and Value, but it fails (he template language expression 'body('Get_item_2')['Department']['Value']' cannot be evaluated because property 'Department' doesn't exist...)  Although I am able to get the values using Compose action so it can't think of a reason for this not to work with Select..?

 

Thanks

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-yuazh-msft
Community Support
Community Support

Hi @smerchatn,

 

I have made a test on my side and don't have the issue that you mentioned.

 

I afraid that the flow failed with error "cannot be evaluated because property 'Department' doesn't exist" because of there is blank column in Department,please make sure the column in the select don't have empty values.

 

You could also add a if() expression to fix the issue.

I have made a test on my side to create the flow as below:

 

Capture.PNG

The expression of the DepartmentValue as below :

if(empty(item()?['Department']?['Value']),null,item()?['Department']?['Value'])

 

The expression of the Lookup as below :

if(empty(item()?['Lookup']?['Value']),null,item()?['Lookup']?['Value'])

The flow would run successfully as below:

Capture.PNG

 

 

Best regards,

Alice

View solution in original post

3 REPLIES 3
v-yuazh-msft
Community Support
Community Support

Hi @smerchatn,

 

I have made a test on my side and don't have the issue that you mentioned.

 

I afraid that the flow failed with error "cannot be evaluated because property 'Department' doesn't exist" because of there is blank column in Department,please make sure the column in the select don't have empty values.

 

You could also add a if() expression to fix the issue.

I have made a test on my side to create the flow as below:

 

Capture.PNG

The expression of the DepartmentValue as below :

if(empty(item()?['Department']?['Value']),null,item()?['Department']?['Value'])

 

The expression of the Lookup as below :

if(empty(item()?['Lookup']?['Value']),null,item()?['Lookup']?['Value'])

The flow would run successfully as below:

Capture.PNG

 

 

Best regards,

Alice

View solution in original post

Thank you for a responce @v-yuazh-msft Alice. I actually tired this yesterday and it wasn't working for me even after getting only one single item back, but fortunately, it is working now.  

 

Do you know why we have to use 'Get Items' to get the values that we could use in 'Select'?.  I am using 'When an item is created or modified' trigger which actually returns 'List of items' but 'Select' action doens't show 'values' but when I use Get items I do get 'value' for 'Select' Action?

 

Thank you once again.

For some reason when I covert the output of 'When an item is created or modified' trigger into an Array like that it works.  

array(triggerBody())

Thanks again!

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Users online (88,383)