Hi All,
Wanting to convert from UTC to E. Australia Standard keeping getting failed runs
Column name is:- Date&timeofincident
Settings edit column value on SharePoint for column is:- Date%5Fx0026%5Ftimeofincident
Expression that I am using is:- convertFromUtc(item()?['Date%5Fx0026%5Ftimeofincident'],'E. Australia Standard Time', 'dd/MM/yyyy hh:mm')
Message after running Flow is:-
The execution of template action 'Create_HTML_table' failed. The column values could not be evaluated: 'The template language function 'convertFromUtc' expects its first parameter to be a string that contains the time. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#ConvertFromUtc for usage details.'.
Solved! Go to Solution.
You could use expression like following instead of just convertFromUtc expression. This expression checks the value of the column whether it is empty, if value is empty, then we dont need to convert timezone, otherwise do convert timezone
if(empty(item()?['Cat1_x003A_Oncallverballynotifie']),'no value', convertFromUtc(item()?['Cat1_x003A_Oncallverballynotifie'],'E. Australia Standard Time', 'dd/MM/yyyy HH:mm'))
Is the value of the column Date%5Fx0026%5Ftimeofincident empty for any records in SharePoint that are being used in the flow?
Hi Anna,
No records are empty in this column
Anna, my apologies.
I solved the issue for the original column by replacing the %5F with an _
Now I have moved to the next column in the table and it does contain empty records. Is there a way I can work around this?
Are you looping through items? You can use expression to check whether column is null or not, and put a value when column value is null
if(empty(items('Apply_to_each_2')?['DueDate']),'no value',items('Apply_to_each_2')?['DueDate'])
Hi Anna,
Where and how would I use this expression?
@MattJ Could you please share screenshot of the flow, action where you are getting the null error, so that i can see how you are using the column that has nul value so that i can guide where and how to use the expression
Hi Anna,
The flow looks like image below - the expression that I am using to convert the timezone is
convertFromUtc(item()?['Cat1_x003A_Oncallverballynotifie'],'E. Australia Standard Time', 'dd/MM/yyyy HH:mm')
The error is
You could use expression like following instead of just convertFromUtc expression. This expression checks the value of the column whether it is empty, if value is empty, then we dont need to convert timezone, otherwise do convert timezone
if(empty(item()?['Cat1_x003A_Oncallverballynotifie']),'no value', convertFromUtc(item()?['Cat1_x003A_Oncallverballynotifie'],'E. Australia Standard Time', 'dd/MM/yyyy HH:mm'))
Hi Anna,
that is so kind and generous of you. thanks so much for your help
User | Count |
---|---|
92 | |
45 | |
21 | |
18 | |
17 |
User | Count |
---|---|
142 | |
50 | |
43 | |
40 | |
31 |