cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Responsive Resident
Responsive Resident

Wandering Data Types

I experience a strange phenomenon from time to time; my data types change unexpectedly/unpredictably.

My data source is a SharePoint list.

Currently, the issue is I have a text field called, "State." "State" was collected via a default value in a hidden text box, like so:

BenDonahue_3-1606923959187.png

 

The SharePoint list has "State" listed as "Single line of text:"

BenDonahue_4-1606924004471.png

 

"State" is Collected as .Text:

BenDonahue_5-1606924055414.png

 

At the end of the multi-page survey, when I try to Patch() using State: State, I am told I have a data type mismatch. Expecting text, received enum:

BenDonahue_6-1606924308910.png

Notice that I am successfully using "StreetAddress: StreetAddress, StreetAddress2: StreetAddress2" earlier in the statement.

The Question

What is going on? 

How do I avoid this wandering data type issue?

How do I fix this code?

 

Thank you for your help in this matter. It is greatly appreciated.

 

P.S. It turns out that, when I add a ForAll to the patch, the fact that PowerApps changed my StreetAddress, again, collected through a textbox, it is collected as a "Record:"

BenDonahue_0-1606924728988.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User III
Dual Super User III

There are some keywords that are used by the system.  I suspect State is one of those and that is what you are getting instead of the variable you defined.  Either rename your variable or try using disambiguation when referencing your variable, ie [@State].



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

View solution in original post

3 REPLIES 3
Dual Super User III
Dual Super User III

There are some keywords that are used by the system.  I suspect State is one of those and that is what you are getting instead of the variable you defined.  Either rename your variable or try using disambiguation when referencing your variable, ie [@State].



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

View solution in original post

Responsive Resident
Responsive Resident

I wonder what other chaos I have been creating by directly altering "State" like that. Ty, @Pstork1.
Would you happen to know why "City" is being changed to an enumerator from text?

Dual Super User III
Dual Super User III

Probably.  When I've used it in the past I've changed it to workcity or something like that.



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

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 (61,092)