cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LozzieD Advocate II
Advocate II

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 Solution Supplier
Solution Supplier

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
New Member

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
Community Support

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 Advocate II
Advocate II

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 Resolver III
Resolver III

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
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

Top Solution Authors
Top Kudoed Authors
Users online (6,768)