Patch > Success

I spent time today redeveloping our Support Desk app, and as I was doing so I stumbled upon someone’s suggestion for how to handle a successful patch event. In my previous post I mentioned one negative in not using Forms was losing the OnSuccess/OnFailure events and the facts these don’t exist outside of Forms.

Quite ingeniously, the person’s post I stumbled upon today suggested use of a collection to store result of a your patch command:

ClearCollect(colPatched, Patch(Comments, Defaults(Comments), {Comment: ThisItem.Comment}))

Thus, a successful patch command creates a collection with a row of data allowing us to develop our own OnSuccess/OnFailure via an If statement checking the number of rows.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.