cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
anzy91
Regular Visitor

Input parameter 'item/CrewID' is required to be of type 'Number/double

Hello,

 

hope you're well 🙂

 

How do I fix this error? 

anzy91_0-1632466583555.png

I would like to how I format crewID column to number/double

 

 

this my flow link to SP list

anzy91_1-1632466760249.png

 

this is list setting for crew id colunm 

anzy91_2-1632466939713.png

 

Any tips or help I would appreciate it. 

 

1 ACCEPTED SOLUTION

Accepted Solutions
eric-cheng
Solution Sage
Solution Sage

Hi @anzy91 ,

 

You can run it and confirm it is in fact giving you the correct value

 

You can then pass it straight into your Create Item

ericcheng_0-1632475812830.png

ericcheng_6-1632475988439.png

 

 

ericcheng_5-1632475981171.png

 

Just a few words of advice though

 

I would recommend changing the form to have restrictions and enforce a numerical value.  You won't need to muck around with expressions and this will avoid situations when:

 

* Some one types in a number (without CW) in the form and you get the wrong crew ID

* Someone adds in '-' e.g. CW-123 and you get CW--123 in SharePoint

 

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

 

 

 

 

 

 

View solution in original post

9 REPLIES 9
eric-cheng
Solution Sage
Solution Sage

Hi @anzy91 ,

 

The issue is that your flow is expecting an input that is purely numerical but is getting CW along with it when you are passing it into the Create Item action.

 

You can either:

 

1) Make the form pass only the numerical value.  You can use restrictions to do this.

ericcheng_1-1632469617733.png

 

2) Use an expression in your flow to extract the numerical part of the CrewID and pass that into Create Item.  This will only work assuming the prefix is always 2 characters e.g. CR

 

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

 

 

@eric-cheng  Thank you for the information. 

 

Could I please know what expression I need to use in my flow?  

eric-cheng
Solution Sage
Solution Sage

hi @anzy91 ,

 

Replace the below in bold with your field value

 

substring(variables('CrewID'),2,sub(length(variables('CrewID')),2))
 
ericcheng_0-1632470265399.png

 

ericcheng_1-1632470347965.png

 

 

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

 

 

 

@eric-cheng How do I find on my flow

eric-cheng
Solution Sage
Solution Sage

Hi @anzy91 ,

 

Add a compose to your flow and pass in the Crew ID. 

 

Click on ... and then Peek Code

ericcheng_1-1632473223156.png

 

Copy out the part I highlighted

ericcheng_2-1632473256539.png

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

 

 

 

 

@eric-cheng 

 

how do i edit peak code on my flow

eric-cheng
Solution Sage
Solution Sage

Hi @anzy91 ,

 

You can't edit it.  

 

You just need to copy it and replace/paste the below in red

 

substring(variables('CrewID'),2,sub(length(variables('CrewID')),2))

 

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

@eric-cheng 

is there anything else I need to do with my flow?

anzy91_0-1632475484228.png

 

eric-cheng
Solution Sage
Solution Sage

Hi @anzy91 ,

 

You can run it and confirm it is in fact giving you the correct value

 

You can then pass it straight into your Create Item

ericcheng_0-1632475812830.png

ericcheng_6-1632475988439.png

 

 

ericcheng_5-1632475981171.png

 

Just a few words of advice though

 

I would recommend changing the form to have restrictions and enforce a numerical value.  You won't need to muck around with expressions and this will avoid situations when:

 

* Some one types in a number (without CW) in the form and you get the wrong crew ID

* Someone adds in '-' e.g. CW-123 and you get CW--123 in SharePoint

 

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

 

 

 

 

 

 

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (3,032)