cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BrianR
Level 10

Re: Injecting updated JSON into msapp without error

@JamesA , sorry to hear that did not work for you.  

I haven't yet tried to edit any of the files and place them back in the zip/msapp, so perhaps this wouldn't work for me either.  In the past this was simple.

 

In actuality it is a shame that we even NEED to do this since PowerApps messes up code so badly it puts your app in these states.  

 

As mentioned earlier, I had to ENTIRELY rebuild my app from scratch (meaning create new app and then cut/paste, and modify everything in it from an older app) in order to get things to work.  Most of the Width and X values (especially) and many of the Y and Height values for MOST of the controls were wiped out when importing components as well as cutting and pasting the controls between apps (or even within the same app).  These appear to be NEW bugs (or at least MUCH worse than in the past).

 

And code continually being automatically changed (formulas wiped out, even some static values changed at times, sometimes collection property accesses replaced with garbage, etc) is ridiculous.

 

Spent FOUR HOURS last night trying to recover from this type of stuff in order to otherwise fix a problem (mine) that should have taken 10 minutes.

 

 

 

kaband
Level: Powered On

Re: Injecting updated JSON into msapp without error

It's a big issue and it makes powerapps very frustrating to work within.  


DeeTronSEAM
Level: Powered On

Re: Injecting updated JSON into msapp without error

@BrianR  and @JamesA ,

 

Thanks so much for your efforts on this.  Two questions....since it's been a few months:

 

1) Have you had any success in getting direct-edits inside MSAPP files to be returneable to PApps and get a functioning app since July?

 

2) BrianR, you mentioned the muckups the PApps Studio does to existing/working formulas. 

 

"And code continually being automatically changed (formulas wiped out, even some static values changed at times, sometimes collection property accesses replaced with garbage, etc) is ridiculous."

I found this thread while looking to see if I was going crazy or if the Studio WAS wiping out stuff I coulda sworn I'd put it/changed. 

 

Are you aware of any official "issue" for this batty behavior having been raised with MSFT?

     

What I'm seeing far too often is I make a change to an existing formula (though I cannot be sure that that includes just creating a formula to replace the existing default) and click over to some other property or control.  When I come back to the original property's formula, it's reverted to an earlier version....as if I never put my newer one there.  WTF!!

 

On a less important note:  VS Code is the "protective gear" one has to use when doing PApps (Studio), don't ya think? 🙂  Thank GOD for VS Code and Notepad++.....oh, and the ability to unzip MSAPPs so I can find stuff that is IMPOSSSIBLE to locate via Studio.

Override
Level: Power Up

Re: Injecting updated JSON into msapp without error

msapp modifications does not work.

1. Download package (let's call it app.zip)

2. Unzip to another folder

3. Go to msapp file (let's call it N4d1dec0a-7dfc-41d3-a346-b61020c26449-document.msapp )

4. Unzip to another folder

5. Modify one existing label in file /Controls/1.json, for ex:

{
                "Type": "ControlInfo",
                "Name": "DataCardKey13",
                "Template": {
                  "Id": "http://microsoft.com/appmagic/label",
                  "Version": "2.3.0",
                  "LastModifiedTimestamp": "0",
                  "Name": "label",
                  "FirstParty": true,
                  "IsCustomGroupControlTemplate": false,
                  "CustomGroupControlTemplateName": "",
                  "IsComponentDefinition": false,
                  "OverridableProperties": {}
                },
                "Index": 0.0,
                "PublishOrderIndex": 40,
                "VariantName": "",
                "LayoutName": "horizontal",
                "MetaDataIDKey": "%FieldName.ID%",
                "PersistMetaDataIDKey": false,
                "IsFromScreenLayout": false,
                "StyleName": "accentLabelStyle",
                "Parent": "ProjectName_DataCard1",
                "IsDataControl": false,
                "IsGroupControl": false,
                "IsAutoGenerated": false,
                "Rules": [
                  {
                    "Property": "Live",
                    "Category": "Data",
                    "InvariantScript": "Live.Off"
                  },
                  {
                    "Property": "Role",
                    "Category": "Data",
                    "InvariantScript": "TextRole.Default"
                  },
                  {
                    "Property": "Text",
                    "Category": "Data",
                    "InvariantScript": "\"Nom de 123 l'affaire\""
                  },

I've added 123 in the middle of string.

 

6. Copy this file 1.json to the msapp archive file (use Total Commander, for example)

7. Copy msapp file (N4d1dec0a-7dfc-41d3-a346-b61020c26449-document.msapp) to the previously downloaded app (app.zip)

8. Upload the app back - no errors, all fine.

9. Open the app for edit - WHOLE PAGE DISAPPEARED!

 

 

 

 

 

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps 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

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Kudoed Authors (Last 30 Days)
Users online (4,043)