In my SharePoint List, I have two fields, Tag and EquipmentStatus. Before a item can be submitted to the list, validation must be passed. Here's the formula on my PowerApps button (DisplayMode property) :
'Loaner Equipment Deployment',
'Tag' in Tag.Text && EquipmentStatus = "Open",
"If the tag already exists somewhere else in this column and if the equipment status equals Open, then display a disabled Submit button"
However, since we turned off unique values for the tag, you can fill out the form still and click the SAVE button (instead of submit) to submit data to the list. (We want users to submit records with an already used tag, but only if the equipmentstatus column is closed and setting unique values on Tag would prohibit that.)
Overall, PowerApps is working find, but the save button bypasses the powerapp functionality.
Any help with be appreciated!
hi @lparkerMDVIP from your requirement would
IsBlankOrError(LookUp('Loaner Equipment Deployment',Tag = Tag.Text).EquipmentStatus) ||
LookUp('Loaner Equipment Deployment',Tag = Tag.Text).EquipmentStatus = "Close",
do it for you?
Please consider changing your Formula to the following:
If( LookUp('Loaner Equipment Deployment', ('Tag' in Tag.Text) && (EquipmentStatus = "Open"), true ), Disabled, Edit )
I hope this is helpful for you.
Change the formula on the OnSave action of the SharePointIntegration object.
The default will just SubmitForm.
No, not place the formula in the OnSave action....
What is your OnSave action formula now?
Yes, and I am stating that this will bypass the logic you are trying to put on a save button.
You need to do one of several things:
1) Disable the default Save button - okay, that was a joke because you can't do it, but you can augment it with a PopUp that would let the user know to use your new save button.
2) Change the formula in the OnSave to acknowledge the displaymode of your save button.
If(yourSaveButton.DisplayMode = Edit, SubmitForm(SharePointForm1))
3) Just don't do anything if they hit save - remove the formula in the OnSave
Check out new user group experience and if you are a leader please create your group
We are excited to announce that Demo Extravaganza for 2021 has started!
On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks
Don't miss the call this month on June 16th - 8a PDT