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

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 @Anonymous ,

 

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 @Anonymous ,

 

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

 

 

Anonymous
Not applicable

@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 @Anonymous ,

 

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

 

 

 

Anonymous
Not applicable

@eric-cheng How do I find on my flow

eric-cheng
Solution Sage
Solution Sage

Hi @Anonymous ,

 

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

 

 

 

 

Anonymous
Not applicable

@eric-cheng 

 

how do i edit peak code on my flow

eric-cheng
Solution Sage
Solution Sage

Hi @Anonymous ,

 

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

Anonymous
Not applicable

@eric-cheng 

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

anzy91_0-1632475484228.png

 

eric-cheng
Solution Sage
Solution Sage

Hi @Anonymous ,

 

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

 

 

 

 

 

 

Helpful resources

Top Solution Authors
Users online (3,901)