Sorry if this is the wrong thread, I'm new here.
I'm new to PowerApps and piecing it together through videos online. I'm attempting to make a self-assessment phone app for covid-19 that records the data input and patches it into the SharePoint list linked to the PowerApps, and I keep getting the error above. It's unclear to me what specifically it's looking for.
My current patch function looks like this:
Patch('Covid Self Assessment Test',MainScreen,{Names:CBNames,Temperature:TempInput,Date:Now(),Symptoms: Symptom_Toggle,Exposure:Exposure_Toggle,RecentTravel:Travel_Toggle})
Names, Temperature, Date, Symptoms, Exposure, and RecentTravel are all column names in my SharePoint list. Can one even collect and patch the results of a toggle switch over to a SharePoint yes/no column?
Attached is exactly what it looks like so far. Any suggestions on how to get it to work?
In your formula, you are referencing the Control and not the actual value.
Consider the following change (you might need to alter based on your actual controls):
Patch('Covid Self Assessment Test',
MainScreen,
{Names:CBNames.Text,
Temperature:TempInput.Text,
Date:Now(),
Symptoms: Symptom_Toggle.Value,
Exposure:Exposure_Toggle.Value,
RecentTravel:Travel_Toggle.Value
}
)
I hope this is helpful for you.
Unfortunately that didn't work. It still gives the same error that there's an invalid argument type (Control) and it's expecting a record value instead. I understand what you meant about it not having a value comparing your suggestion to mine now, but now that everything seems to have a value, I can't see why it says it still needs one.
Thanks for the help so far
Okay...what is MainScreen?
Apologies for the very late reply, I only have powerapps at the workplace right now.
MainScreen is the screen all the values are found. I was trying to follow a video, and in it they used the ThisItem function instead. That didn't seem to work for me (and still doesn't), so I've tried MainScreen in attempt to direct Powerapps to where the data is.
An update. I've done some fiddling with it and mostly got it to work. It seems I had renamed the title in the Sharepoint list, but Sharepoint still saw it as Title. But now a new problem occurs. You can start typing into the combobox and it will search out the name of the person you're typing. Great. Thing is, it only counts what's been typed, not the name you choose once it pops up. I've tried the function with .Text, but it gives me an error.
Here's the updated code I'm now using and that patches, but will only patch the searched text, because it won't give me any other usable choice I can find.
Patch('Covid Self Assessment Test',
Defaults('Covid Self Assessment Test'),
{Title:CBNames.SearchText,
Temperature:TempInput.Text,
Date:Now(),
Symptoms:Symptom_Toggle.Value,
Exposure:Exposure_Toggle.Value,
RecentTravel:Travel_Toggle.Value}
)
I figured out the formula. Now everything seems to be patching everything properly.
Formula was:
Patch('Covid Self Assessment Test',
Defaults('Covid Self Assessment Test'),
{Title:Concat(CBNames.SelectedItems,Names),
Temperature:TempInput.Text,
Date:Now(),
Symptoms:Symptom_Toggle.Value,
Exposure:Exposure_Toggle.Value,
RecentTravel:Travel_Toggle.Value
}
)
Thanks for the help on the values and text information from before.
Check out new user group experience and if you are a leader please create your group
Did you miss the call?? Check out the Power Apps Community Call here!
See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.
User | Count |
---|---|
273 | |
245 | |
83 | |
37 | |
35 |
User | Count |
---|---|
357 | |
247 | |
127 | |
73 | |
44 |