Hello,
I have an excel sheet with multiple columns that is connected to my power automate flow to automatically enter entries into sharepoint list. I get the data by email and I manually copy and paste it into the Excel sheet afterwards I run the flow. In many cases the flow runs smoothly and it add everything into the sharepoint list which is great. In some instances it runs but only adds some of the entries into the sharepoint list and gives me the following error:
InvalidTemplate. Unable to process template language expressions in action 'Create item' inputs at line 0 and column 0: The template language function 'int' was invoked with a parameter that is not valid. The value cannot be converted to the target type.
I think the problem is coming from my currency fields. I have 7 currency fields (Total Requested, Funding Amount, Planning, Organization, Equipment, Training, Exercise And Cost Share) sometimes the field in empty in the excel sheet and sometimes is not. Please see below the function template I used for each currency field:
if(empty(item()?[‘Organization’], null, int(item()?[‘field name’]))
What I need: How I should update the functions so this error doesn’t keep happening?
if(empty(item()?[‘Organization’], null, int(item()?[‘field name’]))
if(empty(item()?[‘Organization’]), null, int(item()?[‘field name’]))
if(empty(variables('Test')), null,
if(not(empty(variables('Test2'))),
if(isInt(variables('Test2')),
int(variables('Test')),
null),
null)
)
if(empty(item()?['Organization']), null, int(item()?['field name']))
(If this answers your question you can mark as Answered and give it a Like)
Michael E. Gernaey
497
Super User 2025 Season 1
David_MA
436
Super User 2025 Season 1
Riyaz_riz11
244
Super User 2025 Season 1