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

Form to update row or add a row

Hello all

 

I have been asked to create a system where by when user fills in the ms form it will either update a row or add a row depending on the date question 

 

So goes like this 

 

User ms form inputs answers to 2 questions 

 

What is the date? 

What is the Meter reading?

 

Then once submitted it will go to add a new row on excel online or if the date is the same update the row 

 

I have tried but get this error 

 

3.PNG

 

 

Flow

 

 

When response is submitted 

 

Get response details 

 

Get all rows in excel table 

 

Filter array

Excel 'what is the date' is equal to 'string(ms forms response what is the date')

 

Condition 

Empty (arraybody) is true

If yes add a row 

If no update a row

 

 

Been driving me crazy

6 REPLIES 6
Mira_Ghaly
Dual Super User
Dual Super User

@Speattie3616 

This is not actually an error , your flow looks correct this means that the condition is evaluating to true so the other branch is not executed.

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

hello

 

thanks for the response 

so the flow adds a row just fine the problem is just keeps adding the row instead of updating the row

i have noted that  my array input and output looks off 

please see pictures its driving me crazy 

1.PNG

here is my flow in full 

 

3.PNG4.PNG

5.PNG

6.PNG

 

here is flow 

 

filter array

item()?[whatis the date?]             is equal to            string(outputs('Get_response_details')?['body/r3e3ed22d1fdc4815ab674f3a4e9cfe2b'])

 

condition

empty (body('Filter_array'))         is equal to         True

7.PNG

8.PNG

@Speattie3616 

The issue must be in how the date value from excel is formatted against the date field that you get from the form response details.

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

i think you may be onto somthing here as i just noticed my output of flow is 

 

12121212121.PNG

 

and the excel date format is 

1.PNG

 its taking the 0 out in excel but i dont know how to format this any ideas?

 

flow output is 2022-0202

excel table is  2/2/2022

 

cant seem to find a way of changing this so its the same

Speattie3616
Frequent Visitor

So found out that if you change the formate on excel to text its all works 

@Speattie3616 

Can you please show what is the expression you are using here?

Mira_Ghaly_0-1643927563402.png

Thanks

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (1,755)