Hi All,
I have a unique column in my SPO list. I created a PA for the list.
DepositSlip is the unique column in SPO. When I enter a duplicate deposit slip in PA, I get an error saying "There was a problem saving your changes. The Data source may be invalid."
Is there a way to produce an error message that is meaningful or at least set focus back the erroring field?
Thanks,
Joe
Solved! Go to Solution.
Hi,
Yes and No 🙂
You are aware of the need for this unique value, so why not have your App Generate it?
If you're not able to (for whatever reason, maybe process maybe values dont follow specific order etc), then you could do a catch of that error by checking for it before the Submit function is called.
So something like having this on your button instead of just Submit():
If(
IsBlank(
LookUp(DataSource, DepositSlipColumnName = DepositSlipValueInApp.Text).DepositSlipColumnName
),
// If its blank then there's no existing value with that same value so submit
SubmitForm(NameOfForm)
,
// If its not blank then let the user know and switch focus to that field
Notify("Please use a Unique value for your deposit slip", NotificationType.Warning);
SetFocus(DepositSlipValueInApp)
)
So what we are doing there is checking if there's any rows with the DepositSlipValue that has been typed in the datasource, before we even consider submitting, then notifying andshifting focus if we do find an existing value.
Hope this has been helpful, let us know if you run into any other issues with it,
Cheers,
ManCat
@iAm_ManCat |
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you! |
Thanks! |
Hi,
Yes and No 🙂
You are aware of the need for this unique value, so why not have your App Generate it?
If you're not able to (for whatever reason, maybe process maybe values dont follow specific order etc), then you could do a catch of that error by checking for it before the Submit function is called.
So something like having this on your button instead of just Submit():
If(
IsBlank(
LookUp(DataSource, DepositSlipColumnName = DepositSlipValueInApp.Text).DepositSlipColumnName
),
// If its blank then there's no existing value with that same value so submit
SubmitForm(NameOfForm)
,
// If its not blank then let the user know and switch focus to that field
Notify("Please use a Unique value for your deposit slip", NotificationType.Warning);
SetFocus(DepositSlipValueInApp)
)
So what we are doing there is checking if there's any rows with the DepositSlipValue that has been typed in the datasource, before we even consider submitting, then notifying andshifting focus if we do find an existing value.
Hope this has been helpful, let us know if you run into any other issues with it,
Cheers,
ManCat
@iAm_ManCat |
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you! |
Thanks! |
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
194 | |
45 | |
45 | |
44 | |
37 |
User | Count |
---|---|
280 | |
81 | |
81 | |
81 | |
69 |