cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Add value to a choice column when update file properties

Hi all,

 

I have made a nice flow to update the retention period with a approval. I have build a workaround. When the owner wants to add the retention periode to exten with one year, i add this value to the date column: addDays(utcnow(),+365,'dd-MMMM-yyyy')  This works fine but i need a better solution.

I have a Retention choice column, 1-5-10 years. When i choose Update file properties i need to add 1 year to this column. So it should be 2 years or 6 years, etc. What is the expression for this? I have tried al sort of expression but i dont get the right one. 

items('Apply_to_each')?['Internalcolumn']?['Value']
When i add +1, i cant close the expression because it's invalid. 


1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Anonymous ,

 

I have made a test on my side and the flow would works with expression below:

add(int(items('Apply_to_each')?['RP']?['Value']),1)

Please take a try with my expression and let me know if your problem could be solved.

1.png

2.png

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

8 REPLIES 8
yashag2255
Dual Super User II
Dual Super User II

Hi @Anonymous 

 

Can you confirm the column settings as shown in the screenshot below: 

sssa.PNG

I then have a flow to update the item as: vbt.PNG

The expression used is : 

add(int(body('Get_item')?['RP']?['Value']),1)

Here, we are converting the value of the choice column to int and then adding 1 to it to create a choice manually. 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Anonymous
Not applicable

Hi! Looks awesome and i'm almost there but i use a library instead of a list.

That's why i use apply to each for my flow. This is the error, what makes sence. 

 
The template validation failed: 'The action(s) 'Get_item' referenced by 'inputs' in action 'RP' are not defined in the template.'.

I use Get files (properties only), so my expression is:

add(int(body("Get_files_properties_only)")?['RP']?['Value']),1)
But that is not good.

Hi @Anonymous 

 

Can you post a screenshot of your flow? I am able to do it on the documnet library for files too. 

 

 

dfw.PNG

 

Can you confirm that you have the column 'RP' in the library? 

 

Expression: 
add(int(body('Get_file_properties')?['RP']?['Value']),1)

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Anonymous
Not applicable

Yes, i confirm that. Here is my flow. I need to send mails to a SharePoint group, that's why it buid like this. 

 

FlowExtend.png

Hi @Anonymous ,

 

I have made a test on my side and the flow would works with expression below:

add(int(items('Apply_to_each')?['RP']?['Value']),1)

Please take a try with my expression and let me know if your problem could be solved.

1.png

2.png

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Anonymous
Not applicable

Hi Alice,

 

Thank you for your answer. I think my flow is maybe in the beginning to complex because i get this fault. I will try tomorrow a simple with your expression. It should work 🙂

Hi @Anonymous ,

 

Please let me know if your problem could be solved.

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

@v-alzhan-msft Thank you again, i made a nice approval - switch case with four update values, have a nice weekend!

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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (54,155)