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

BUGS - Project corrupted? Patch no longer recognizes Choice or Text fields in SP, Patch no longer pulls value from Radio or Dropdown Inputs

I've been using Patch, Sharepoint Lists, Radio and Dropdown inputs without issue but suddenly new inputs and Patch does not work right.

 

I imported a new Sharepoint list with new columns, changed some of the columns to Choice "Approve", "Deny". Created a new data link and changed everything over, everything works.

 

But now there are two problems. When trying to save the value of a new Radio or Dropdown input it writes to Sharepoint blank values. Radio1.SelectedText.Value and Radio1.Selected.Value both write blank now when entered as value in Patch Value: field. It does the exact same thing with Dropdown controls as well. If I put a text value in Value: field, "banana" anything, it writes the value fine, but not from SelectedText.Value. If I make a label control and put Radio1.SelectedText.Value as Text it shows whatever is selected as it should.

 

The other problem is Patch no longer recognizes a Sharepoint choice column correctly, it thinks it is a Text field, it does this with every single choice field, but only new code. Old code works fine.

 

I believe both of these problems started simultaneously. I have tried everything I can think of. Broke connection with SP list, made new one. Deleted radio / dropdown cards and created new custom cards and inputs from scratch. Closed out every Chrome tab and deleted all cache. Made a new Test column in SP as a Choice field and it still see's it as Text and writes blank to it.

 

Any ideas? I can try reverting back to a differently named revision from noon today but I'm afraid if I do the same thing I'm going to get the same result. I can also reimport a new Sharepoint list but will that fix it and will it happen again?

 

UPDATE: It's at least recognizing the choice fields properly now, I had closed out the project completely again and now it seems to be okay in that regard. It's still writing blank values when using Radio Input values though.

 

Patch(splist,ThisItem,{Test:{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",Id:1,Value:TestRadio.SelectedText.Value}});

 

1 ACCEPTED SOLUTION

Accepted Solutions
Frequent Visitor

I figured something out.

 

I have two other Patch commands in the same Onselect that are up above with a ; after them. If I comment out one or the other or both it will go through normally. 

 

So instead of doing 3 different Patch commands I did it all in one and it works correctly. Apparently it doesn't like more than 2 Patch commands in a single Onselect.

View solution in original post

3 REPLIES 3
Super User III
Super User III

As a work around can you patch the Textbox instead of directly using the radio control. What items do you have on your Radio control

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

My control is a form card with a label and radio control on it. Radio items are "Approve" and "Deny". If I put an If statement in there and try to test DomainAdminRadio1.SelectedText.Value = "Approve" it always comes back false. Yet if I use that outside of Patch and put it in say a label, it reads the value just fine. Code that I have on other controls matches this code exactly and works just fine, but any new controls I create it does not work anymore. If I hover over the value in the patch command it even shows "Approve" or "Deny" as the value.

 

Patch(
    splist,
    ThisItem,
    {
        'AD Action': {
            '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
            Id: 1,
            Value: DomainAdminRadio1.SelectedText.Value
        }
    }
);

 

 
Frequent Visitor

I figured something out.

 

I have two other Patch commands in the same Onselect that are up above with a ; after them. If I comment out one or the other or both it will go through normally. 

 

So instead of doing 3 different Patch commands I did it all in one and it works correctly. Apparently it doesn't like more than 2 Patch commands in a single Onselect.

View solution in original post

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (82,058)