cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LozzieD
Level: Powered On

UpdateIf broken with release 3.19064.13 ?

My UpdateIf statement in an app works in 3.19064.11 but not since 3.19064.13 arrived today.

 

See attached.

 

 

 

 

5 REPLIES 5
K-A-R-L
Level 10

Re: UpdateIf broken with release 3.19064.13 ?

Hi @LozzieD ,

 

Can you please try the followwing:

  1. Cut the UpdateIf() code and paste it back again then run the app.
  2. Try add a Refresh(DataSource) before the UpdateIf()
  3. Delete Cache and try using different browser and see if any of it works.
  4. Try reverting back to the previous and check if you see any error.

Thanks,
K-A-R-L


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

shams_132
Level: Power Up

Re: UpdateIf broken with release 3.19064.13 ?

My OnStart is not triggering in this new release, it was working fine in previous version of PA

Community Support Team
Community Support Team

Re: UpdateIf broken with release 3.19064.13 ?

Hi @LozzieD ,

Could you please share more details about the UpdateIf formula you used within your app?

 

According to the screenshot you provided, I think there is something wrong with the value you provided for the thrid argument within the UpdateIf function.

 

Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. The screenshot as below:7.JPG

Set the OnSelect property of the "Save" icon to following:

UpdateIf('20190325_case13', ID = ThisItem.ID, {Title: TextInput2.Text, ProjectName: TextInput1.Text, DueDate: DatePicker1.SelectedDate})

Please check if you have typed a proper UpdateIf formula within your app. The standard UpdateIf formula as below:

UpdateIf(
           'YourDataSource',
            'Filter Condition',   /* <-- Type your filter condition here. On your side, you may type FilterColumn = ThisItem.FilterColumn */
{
Column1: "xxx",
Column2: "xxx",
Column3: "xxx",
...
} )

Please consider modify your UpdateIf formula as above formula format, then check if the issue is solved. If you save the update record into a IoCTempProp variable, please consider modify above formula as below:

UpdateIf(
           'YourDataSource',
            'Filter Condition',   /* <-- Type your filter condition here. On your side, you may type FilterColumn = ThisItem.FilterColumn */
{
Column1: IoCTempProp.Column1, /* <-- extract corresponding argument values from the IoCTempProp variable */
Column2: IoCTempProp.Column2,
Column3: IoCTempProp.Column3,
...
} )

If the IoCTempProp. is a collection, please consider modify above formula as below:

UpdateIf(
           'YourDataSource',
            'Filter Condition',   /* <-- Type your filter condition here. On your side, you may type FilterColumn = ThisItem.FilterColumn */
{
Column1: First(IoCTempProp).Column1, /* <-- extract corresponding argument values from the IoCTempProp variable */
Column2: First(IoCTempProp).Column2,
Column3: First(IoCTempProp).Column3,
...
} )

 

In addition, you could also consider take a try to use Patch function to update your data source records instead of the "UpdateIf" function. The Patch formula format as below:

Patch(               /* <-- Update single one record */
          'YourDataSource',
           LookUp('YourDataSource', FilterColumn = "A specific value"),
           {
              Column1: "xxx",
              Column2: "xxx",
              ...
           }
)

Or

ForAll(              /* <-- Update multiple records in your data source */
          RenameColumns(Filter('YourDataSource', FilterColumn = "A specific value"), "PrimaryColumn", "PrimaryColumn1"),
          Patch(
                    'YourDataSource',
                     LookUp('YourDataSource', PrimaryColumn = PrimaryColumn1),
                     {
                        Column1: "xxx",
                        Column2: "xxx",
                        Column3: "xxx",
                        ...
                     }
          )
)

More details about the ForAll function and Patch function, please check the following article:

ForAll function

Patch function

 

If the issue still exists, please consider remove the data source connection from your app, then re-add it again within your app, try your UpdateIf formula again, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
LozzieD
Level: Powered On

Re: UpdateIf broken with release 3.19064.13 ?

Thanks for the responses, bear with my while I process your feedbacks ...

 

But ij the mean time, I kinda "fixed" the problem, but maybe not really, TBC, as follows ...

 

The UpdateIf is accessing a collection (ColMassGen), plucking out a record to update (COMB_KEY = ThisItem.COMB_KEY), and punching a record over-the-top of / merging into it (locTempProp).  As said, this was working fine for some time, but .13 suddenly introduced a wriggly-red underline on the UpdateIf.

 

The extra bit of info is that the locTempProp record was cheekily adding an extra column to the ColMassGen collection i.e. the set of columns in the locTempProp including some that weren't already in the ColMassGen collection.  in .11 it was ok with that.  In .13, not longer.

 

So my "fix" was to pre-populate the ColMassGen with the extra columns in anticiaption of the locTempProp record coming in from the UpdateIf.  Wriggly-red disappeared.

 

It might be that this was an intentional "tightening-up" of the flexibility previously in .11?  i.e. not so flexible now, but working ok with some extra manual prep of the target of the UPdateIf as described.

 

Will pick this up again later and post back when I get a moment, both doubel-checking what I just said above and the feedback from others.

 

 

Helpful
Level 8

Re: UpdateIf broken with release 3.19064.13 ?

I'm seeing stange behavior where nothing executes after UpdateIf.

The UpdateIf executes as expected, however, I have a Back() function after it that never fires.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,195)