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:
The SharePoint list has "State" listed as "Single line of text:"
"State" is Collected as .Text:
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:
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:"
Solved! Go to Solution.
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].
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].
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?
Probably. When I've used it in the past I've changed it to workcity or something like that.
User | Count |
---|---|
196 | |
126 | |
87 | |
49 | |
42 |
User | Count |
---|---|
284 | |
160 | |
138 | |
75 | |
72 |