cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sailormoon218
Frequent Visitor

flow from form to list - date error

sailormoon218_0-1622632202306.png

i have a flow running from a form to a list and now when it runs it comes up with an error if the accommodation arrival date and accommodation departure date are empty, tried some of the other solutions but still cant get it to work, the date is picked via the date picker on the form. 

1 ACCEPTED SOLUTION

Accepted Solutions

if(gt(length(outputs('Get_response_details')['body/r93aae1b448a543a0a2ec67e6a13f512f']),0),outputs('Get_response_details')?['body/r93aae1b448a543a0a2ec67e6a13f512f']),null)

View solution in original post

4 REPLIES 4
manuelstgomes
Super User II
Super User II

Hi @sailormoon218 

 

It should be ok if the date is not mandatory on your SharePoint List. You can check if it's empty and if it is send to SharePoint "empty". Something like:

if(gt(length(<Insert here the date field>),0),<Insert here the date field>,null)

 

Can you please check if and let me know if you have any questions?

 

Cheers
Manuel

-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

hi thanks, tried that and it is saying Unable to process template language expressions in action 'Create_item' inputs at line '1' and column '22983': 'The template language function 'if' expects three parameter: the condition to test as the first parameter, the value to return if the condition is true as the second parameter, and the value to return if the condition is false as the third parameter. The function was invoked with '1' parameter(s). Please see https://aka.ms/logicexpressions#if for usage details.'.

Hi @sailormoon218 

 

Can you please post your expression so that I can see what could be the issue?

 

Cheers
Manuel

-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

if(gt(length(outputs('Get_response_details')['body/r93aae1b448a543a0a2ec67e6a13f512f']),0),outputs('Get_response_details')?['body/r93aae1b448a543a0a2ec67e6a13f512f']),null)

View solution in original post

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (3,712)