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

When a new line is created through PowerApps form, some information are deleted in other random line in SharePoint list

I have created a form in PowerApps with data source in SharePoint list and starting few days before I have identified that when a new line is created in the list, randomly only for two fields (columns) the values are removed (please see the attachment).

 

Is it there a bug or I have made any mistake?

 

How can be this solved?

 

Could you please support?

 

Thank you,

Ovidiu. 

1 ACCEPTED SOLUTION

Accepted Solutions

OK, when using Choice columns, here are a few tips to help:

  • Turn off the column setting that requires it to contain information
  • Make sure all possible choices that can be generated in the app are present as choices in the list columns
  • Just in case, allow new choice values to be added manually

The If() statement you are using to control the Items property, for a dropdown presumably, is referencing the same control (DataCardValue11_1) as you are using in your Update property. Am I understanding that correctly? This means that as soon as you make a selection in the dropdown, there is a new set of choices. This circular logic may mean the DataCardValue11_1.Selected is not what you think it is. Or, is there a second, dependent, dropdown that you should be referencing instead? The syntax of controlname.Selected is correct for sending info to a choice column.

Finally, your If() statement is a bit confusing. Consider using this Switch(), which puts all the "N/A" choices as a default result:

 

Switch(DataCardValue11_1.Selected.Value,
    "Access Control System",["Door","Turnstile","Barrier/ Gate", "Panique Buttons","Reader","Software","Other"],
    "CCTV",["Camera","NVR Recorder","Software","Other"],
    "Intrusion System",["Sensor","Panel","Event"],
    "Panic Buttons",["Sensor","Panel","Event"],
    "Fire Detections/ Fighting",["FM 200","Fire Panel","Sprinklers","Hydrants","Smoke Detectors"],
    "Equipment",["Type of Equipment"],
    "Positive Tests",["Positive Antigen Tests","Positive PCR Tests"],
    ["N/A"]
)

 

Let us know if any of this helps the situation.

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

View solution in original post

11 REPLIES 11
BCLS776
Super User
Super User

Knowing very little about your app and form, the first place I would look is at the Update properties in the form associated with those columns. Those set the values that are stored in those columns when SubmitForm() is run.

If you are able to share more information about your app, we can see if anything else is going on.

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

Hello,

 

Thank you for your reply.

 

What does it mean "Update properties in the form"?

 

I have created a form in PowerApps and for the drop downs I have created collections in order to create a better connections for the end users.

 

Sometimes, randomly, in two columns only, in the data source (SharePoint list), the values are removed once a new form is submitted and a new line is created in the data source (please see the attached capture).

 

The items for those two fields (Sub-category1 and Sub-category2) are created based on IF statement: If(
DataCardValue11_1.Selected.Value="Access Control System",["Door","Turnstile","Barrier/ Gate", "Panique Buttons","Reader","Software","Other"],
DataCardValue11_1.Selected.Value="CCTV",["Camera","NVR Recorder","Software","Other"],
DataCardValue11_1.Selected.Value="Intrusion System",["Sensor","Panel","Event"],
DataCardValue11_1.Selected.Value="Panic Buttons",["Sensor","Panel","Event"],
DataCardValue11_1.Selected.Value="Fire Detections/ Fighting",["FM 200","Fire Panel","Sprinklers","Hydrants","Smoke Detectors"],
DataCardValue11_1.Selected.Value="Equipment",["Type of Equipment"],
DataCardValue11_1.Selected.Value="Trespassers",["N/A"],
DataCardValue11_1.Selected.Value="No Badge",["N/A"],
DataCardValue11_1.Selected.Value="Unescorted",["N/A"],
DataCardValue11_1.Selected.Value="Tailgating",["N/A"],
DataCardValue11_1.Selected.Value="Power",["N/A"],
DataCardValue11_1.Selected.Value="Water",["N/A"],
DataCardValue11_1.Selected.Value="Internet",["N/A"],
DataCardValue11_1.Selected.Value="Other",["N/A"],
DataCardValue11_1.Selected.Value="Weather",["N/A"],
DataCardValue11_1.Selected.Value="Fire",["N/A"],
DataCardValue11_1.Selected.Value="Pandemic",["N/A"],
DataCardValue11_1.Selected.Value="Civil Unrest",["N/A"],
DataCardValue11_1.Selected.Value="Earthquake",["N/A"],
DataCardValue10_1.Selected.Value="Threats of Violence",["N/A"],
DataCardValue10_1.Selected.Value="Vandalism/ Theft",["N/A"],
DataCardValue11_1.Selected.Value ="Positive Tests",["Positive Antigen Tests","Positive PCR Tests"]) 

 

Could you please support on this?

 

Thank you.

BCLS776
Super User
Super User

The Update property of a card on the form is the field that determines what value will be passed to the Sharepoint List when SubmitForm() is run:

 

BCLS776_0-1628618823330.png

 

Could you check the cards related to the troublesome columns in your app to see if an Update property exists and that it is a valid value to pass to that kind of Sharepoint column?

Also, here is a handy document on working with forms & cards.

If you share the code currently in those Update properties, and some information on the Sharepoint column types, we'll help you get those working.

Bryan

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

For each card on Update is the same formula: DataCardValue11_1.Selected

 

Please see below the column types in SharePoint list:

OvidiuVacaru_0-1628620552185.png

 

Thank you,

Ovidiu.

OK, when using Choice columns, here are a few tips to help:

  • Turn off the column setting that requires it to contain information
  • Make sure all possible choices that can be generated in the app are present as choices in the list columns
  • Just in case, allow new choice values to be added manually

The If() statement you are using to control the Items property, for a dropdown presumably, is referencing the same control (DataCardValue11_1) as you are using in your Update property. Am I understanding that correctly? This means that as soon as you make a selection in the dropdown, there is a new set of choices. This circular logic may mean the DataCardValue11_1.Selected is not what you think it is. Or, is there a second, dependent, dropdown that you should be referencing instead? The syntax of controlname.Selected is correct for sending info to a choice column.

Finally, your If() statement is a bit confusing. Consider using this Switch(), which puts all the "N/A" choices as a default result:

 

Switch(DataCardValue11_1.Selected.Value,
    "Access Control System",["Door","Turnstile","Barrier/ Gate", "Panique Buttons","Reader","Software","Other"],
    "CCTV",["Camera","NVR Recorder","Software","Other"],
    "Intrusion System",["Sensor","Panel","Event"],
    "Panic Buttons",["Sensor","Panel","Event"],
    "Fire Detections/ Fighting",["FM 200","Fire Panel","Sprinklers","Hydrants","Smoke Detectors"],
    "Equipment",["Type of Equipment"],
    "Positive Tests",["Positive Antigen Tests","Positive PCR Tests"],
    ["N/A"]
)

 

Let us know if any of this helps the situation.

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

View solution in original post

Hello,

 

Thank you for your support.

 

I have changed If() statement with Switch() as you suggested.

 

At this moment I have "DataCardValue12_1.Selected" in Update property and the Switch() formula you have mentioned in your last reply (I hope this is correct).

 

As I said the error appears not to often, and I hope your solution will solve it.

 

I will come back to you if the issue persists.

 

Thanks a lot 🙂

 

Regards,

Ovidiu.

Hello,

 

The issue still appears (for the same columns only)...

 

This is so weird...

BCLS776
Super User
Super User

Yes, this is a weird issue. Let's get some more info from you to help diagnose what's going on. Can you share?:

  • Are there any other flows or apps operating on this list, specifically those columns?
  • Is the list shared with others and can you confirm they are making no manual edits?
  • Do you notice when the issue is happening? Once a day? Every second record? When another field has a certain value in it? Any pattern could be helpful.
  • Have you noticed any patterns when you see successful app behavior?
  • Can you run through the changes you've made to the app since the start of this thread so we know what you have / have not changed?
_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

Hello,

 

Please find below my highlighted answers:

  • Are there any other flows or apps operating on this list, specifically those columns?
    • I have many Power Automate flows related to all the columns: email notifications to the submitter once a new line is created; email notifications to the submitter every time the Status value is changed (Status and Comments columns only); email notifications and Teams messages when a new line is created and the threshold exceeded (the team has a threshold for each Category and they have to react within the threshold); collecting the 5 last versions for Modified and Modifies By in others created columns.
    • All are created "When an item is created" and  "When an item or a file is modified" - SharePoint list.
  • Is the list shared with others and can you confirm they are making no manual edits?
    • The list is shared with all the users and they make the changes through PowerApps (no manual edits directly in the list).
  • Do you notice when the issue is happening? Once a day? Every second record? When another field has a certain value in it? Any pattern could be helpful.
    • I was not able to identify something like this, it is totally random. I have created earlier three new lines and only for one lines happens, for the first one (below you can see the whole list).OvidiuVacaru_0-1629277766841.png

       

  • Have you noticed any patterns when you see successful app behavior?
    • No all is working well in the app.
  • Can you run through the changes you've made to the app since the start of this thread so we know what you have / have not changed?
    • I have replaced If() with Switch(); I did not changed those two columns as not mandatory fields because I need them to be mandatory.

 

Thanks a lot for your support.

 

Best regards,

Ovidiu.

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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 (1,437)