web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Transform Input from M...
Power Automate
Suggested Answer

Transform Input from Ms Form to Integer

(0) ShareShare
ReportReport
Posted on by 4
Hi, I would like to insert input from Ms Form to Sharepoint List.
 
One of the question is in Text form (choice question), asking about Quarter (Quarter 1, Quarter 2, Quarter 3, Quarter 4). Another question is asking about duration (in quarter as well). I need to calculate the end of quarter based on these two information. Eg, if Quarter=Quarter 1, and duration is 2 quarters, then end of quarter = Quarter 2.
 
My thought is by convert the start of quarter into integer first. Then use expression 'Add' and 'Mod' to calculate the end quarter. Yet I get 0 as input at the Compose action. 

My expression in compose: 
if(equals(outputs('Get_response_details')?['body/ab1'], 'Quarter 1'), 1, if(equals(outputs('Get_response_details')?['body/ab2'], 'Quarter 2'), 2, if(equals(outputs('Get_response_details')?['body/ab3'], 'Quarter 3'), 3, if(equals(outputs('Get_response_details')?['body/ab4'], 'Quarter 4'), 4, 0))))
Anyone have any ideas on converting this to integer? Or maybe ways to get end of quarter?

Thank you in advance.

Categories:
I have the same question (0)
  • Suggested answer
    David_MA Profile Picture
    15,414 Super User 2026 Season 2 on at
    The expression you show should return 1, 2, 3 or 4. To make it an integer, you just need to wrap it with an int expression: 
     
    int(if(equals(outputs('Get_response_details')?['body/ab1'], 'Quarter 1'), 1, if(equals(outputs('Get_response_details')?['body/ab2'], 'Quarter 2'), 2, if(equals(outputs('Get_response_details')?['body/ab3'], 'Quarter 3'), 3, if(equals(outputs('Get_response_details')?['body/ab4'], 'Quarter 4'), 4, 0)))))
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 266 Super User 2026 Season 2

#2
trice602 Profile Picture

trice602 160 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 134 Super User 2026 Season 2

Last 30 days Overall leaderboard