web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / SharePoint integration...
Power Apps
Unanswered

SharePoint integration: error to submit form with field visible only when other field has particular value

(0) ShareShare
ReportReport
Posted on by 304

Hello,

I have a simple list in SharePoint and designed new form in PowerApps; I have a field, "Codice Fiscale" that I set hidden, and I want to show only when the value in the field type is equal to "104" and also only for particular users.

PowerApps #1.png

 

For this, I set for CodiceFiscale_DataCard_1 the property "Visible" to false and then, in the advanced properties I set "Visible" with the formula 

If((CurrentUser.Email = "xyz@mytenant.com" && DataCardValue1_1.Selected.Value = "104") || (CurrentUser.Email = "abc@mytenant.com" && DataCardValue1_1.Selected.Value = "104");true; false)

In the button "Salva" I set th OnSelect with

SubmitForm(SharePointFormNew)

with SharePointFormNew is my form; when I test it (and also execute inside my SP list) I have this error:

PowerApps #2.png

 

The translation is something like: "Network error during the use of Patch function: the requested operation is not valid".

I noticed that some times it works, as in the error, some times I have no error, like you can see in this image of the inspector:

PowerApps #3.png

 

I don't know if it depends on value on cache in the environment or something similar, or something related to visible property.

Another example, now for the error; I have chosen the type that is not "104", say "Ferie" and clicked on "Salva" button, no error, then choose "104" and clicked on "Salva" and I have the error, like in the inspector image:

PowerApps #4.png

 

Any help is appreciated.

 

Marco Mangiante

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    156,277 Most Valuable Professional on at

    Hi @mmangiante ,

    You can shorten the Visible code to (you also do not need If/true/false as it is inferred)

    DataCardValue1_1.Selected.Value = "104" &&
    (
     CurrentUser.Email = "abc@mytenant.com" ||
     CurrentUser.Email = "xyz@mytenant.com"
    )

    however, that error will not be caused by the visibility of card, rather possibly something you have left out of the CodiceFiscale_DataCard_1 on SubmitForm, however I see that it does not appear to be Required (please confirm this) and what is strange is that your error does not refer to a particular field (which is will do with a Required field), You have also noted that sometimes it works, which eliminates a lot of things.

    The main causes of this error are generally:-

    • Code errors - these could be in the Update properties of your data cards, but unlikely in your case
    • Connectivity - could explain the intermittent nature of this
    • Permissions - is this only happening for particular users ?
    • Required fields not being written - although the error is generally specified.

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • mmangiante Profile Picture
    304 on at

    Hello @WarrenBelz 

    thanks for your reply. I confirm that the field CodiceFiscale_DataCard_1 is not required, the only constraint is when I created the field in the SP list, where I set that the filed must have max 16 letters; the only required field, set in SP list, is Tipo.

    I suppose it is not a connectivity issue (at least on my side), because I tried it in the office, in a train and at home; I also suppose it is not a permission issue because I've seen it at least in 2 test accounts (but I can try with other).

    What I also seen in another test, for example, is this: I try to submit the form with the Tipo = 104  and a value for Codice Fiscale and have the error; after this, if I choose other, say Type = Ferie I can do it without error but I see in SP list the Codice Fiscale filled with the previous value

    PowerApps #5.png

     

    So, first of all, I think I have a problem to cancel the values in a form when I want to do more tests, but how to do that at every test I have the field without previous values; for example, for Tipo how I can every time cancel what I have inside it, so in every test I can have a blank field?

    Is also correct thay in the button Salva in the event OnSelect I have

    SubmitForm(SharePointFormNew);;NewForm(SharePointFormNew)

    Initially I have only the submit part, then I changed it to do some trial and added the NewForm part; I don't know if I have to also set something similar in the edit form that I created.

     

    Thanks for help.

  • WarrenBelz Profile Picture
    156,277 Most Valuable Professional on at

    Hi @mmangiante ,

    This particular generic error message is one of the more difficult to pinpoint the cause at times (hence the list of possibilities I suggested).The NewForm() will have no bearing on this as the error is in the SubmitForm action. From what you are posting on the symptoms, it seems to be related to the field that is not updating, so first, look at the Update of that Data Card. A bit from left-field (and clutching at straws a bit) here, but is it seeing 104 as a number - you can test this by changing it to a104 or similar.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 396 Most Valuable Professional

#2
11manish Profile Picture

11manish 134 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 101 Super User 2026 Season 2

Last 30 days Overall leaderboard