Metafx-tabstrip > data : tabs display order issue

I have to modify Purchase Advisor Entry to add one custom tab On Order (With Remaining Qty to receive) similar to On Order. I was able to replicate this with adding custom BAQ views. However I am not able to add next to On Order, as per image below. I experimented with Application Map > Page Peer Order, but it will display correct order in map view.

If you have interest for this enhancement request, please vote my idea at : https://epicor-manufacturing.ideas.aha.io/ideas/KIN-I-3745

I voted for the enhancement, but as a workaround in case you don’t want to rebuild the tab strip, I’m sure you could modify the order in the JSON and push it back into SQL.

1 Like

I tried couple times in past for learning with jsonc files on server metaui> apps folder. not able to find the exact location where custom kinetic apps .jsonc are stored?

Per support they are stored in xxxdef chunks. At present only way to export/import is SWB even for one app. Any thoughts how to push them in sql? Thanks for the vote.

They’re in Ice.XXXDef. SysCharacter03 is the WIP. Content is the published JSON.
Use SSMS to pull and push the JSON to and from the DB.

Thanks for the update and info. I will wait for Epicor to fix than changing them in sql. Is there other way around without direct sql change.

There’s some conversion you can run in conversion work bench that loads it from disk rather than DB.
Haven’t fiddled with that in awhile, though.

Let me preface this message by saaaaying:

The following is only intended for mature audiences. Viewer discretion advised.

This involves updating SQL directly and should be used at your own risk. Use test environments. Don’t do this in production. Shoey, close your eyes. I am not responsible for any data corruption if done improperly.

Any whooooooooo.
This works a treat:

Grab the JSON from the DB:

ELECT SysCharacter03 FROM Ice.XXXDef
WHERE TypeCode = 'KNTCCustLayer' AND Key1 = 'asd'
/* Key1 is your layer name. You can also add in Key2 for the program 
like Erp.UI.ABCCodeEntry if you have layers with the same name. 
This is up to you to isolate the single record*/

Copy that JSON into your text editor of choice so we can read it better.

Find your tab strip and swap these guys any which way you want. each {} is a single tab.

image

Now let’s make it SQL friendly and push it back in.

First, compress the code to get rid of extra tabs and spacing.

Then, find and replace all single quotes with two single quotes (to escape the character in SQL).

Then, update SQL.


UPDATE Ice.XXXDef
SET SysCharacter03 = '{"layout":{"Name":"layout","Version":"3.0","Diffs":[],"Operation":"Replace"},"Details":{"Name":"Details","Version":"3.0","Diffs":[{"Id":"56202159-3fd1-4d69-a34d-57b6e1164e07","Path":"components","Value":{"id":"56202159-3fd1-4d69-a34d-57b6e1164e07","sourceTypeId":"erp-text-box","model":{"guid":"56202159-3fd1-4d69-a34d-57b6e1164e07","labelText":"erp-text-box-1","id":"erp-text-box-56202","epBinding":"KeyFields.Peter","isKeyField":true},"parentId":"div-col-786eb","layoutData":{"hostId":"div-col-786eb"}},"Operation":"Add","Index":6},{"Id":"bc5cbdd8-52bc-4958-bb31-9a10ae18a49d","Path":"components","Value":{"id":"bc5cbdd8-52bc-4958-bb31-9a10ae18a49d","sourceTypeId":"erp-text-box","model":{"guid":"bc5cbdd8-52bc-4958-bb31-9a10ae18a49d","labelText":"Enter String","id":"erp-text-box-bc5cb","epBinding":"TransView.EnterString"},"parentId":"div-col-6993d","layoutData":{"hostId":"div-col-6993d"}},"Operation":"Add","Index":19},{"Id":"929c34fc-5dc3-4a23-8b7f-9b875c9e5933","Path":"components","Value":{"id":"929c34fc-5dc3-4a23-8b7f-9b875c9e5933","sourceTypeId":"erp-button","model":{"guid":"929c34fc-5dc3-4a23-8b7f-9b875c9e5933","labelText":"Format","id":"erp-button-929c3"},"parentId":"div-col-6993d","layoutData":{"hostId":"div-col-6993d"}},"Operation":"Add","Index":20},{"Id":"336ea8ab-faaa-4a8e-953f-9f074607497e","Path":"components","Value":{"id":"336ea8ab-faaa-4a8e-953f-9f074607497e","sourceTypeId":"erp-text-area","model":{"guid":"336ea8ab-faaa-4a8e-953f-9f074607497e","labelText":"Formatted String","id":"erp-text-area-336ea","noFloatingLabel":"on","epBinding":"TransView.FormattedString","rows":5},"parentId":"div-col-6993d","layoutData":{"hostId":"div-col-6993d"}},"Operation":"Add","Index":21},{"Id":"b4e9301c-a962-43de-97b8-23b8d0c274c9","Path":"components","Value":{"id":"b4e9301c-a962-43de-97b8-23b8d0c274c9","sourceTypeId":"erp-date-picker","model":{"guid":"b4e9301c-a962-43de-97b8-23b8d0c274c9","labelText":"Date 1","id":"erp-date-picker-b4e93","epBinding":"TransView.Date1"},"parentId":"div-col-6993d","layoutData":{"hostId":"div-col-6993d"}},"Operation":"Add","Index":22},{"Id":"2579c4c2-b133-4521-a650-3fc8d50d4bdd","Path":"components","Value":{"id":"2579c4c2-b133-4521-a650-3fc8d50d4bdd","sourceTypeId":"erp-date-picker","model":{"guid":"2579c4c2-b133-4521-a650-3fc8d50d4bdd","labelText":"Date 2","id":"erp-date-picker-2579c","epBinding":"TransView.Date2"},"parentId":"div-col-6993d","layoutData":{"hostId":"div-col-6993d"}},"Operation":"Add","Index":23},{"Id":"caf80e58-ffe8-4d39-a2cb-4f13f6380159","Path":"components","Value":{"id":"caf80e58-ffe8-4d39-a2cb-4f13f6380159","sourceTypeId":"erp-button","model":{"guid":"caf80e58-ffe8-4d39-a2cb-4f13f6380159","labelText":"erp-button-1","id":"erp-button-caf80"},"parentId":"div-col-6993d","layoutData":{"hostId":"div-col-6993d"}},"Operation":"Add","Index":24},{"Id":"div-col-6993d","Path":"components","Value":null,"Operation":"Move","Index":25},{"Id":"ecec5b8d-d8bf-4c00-8c78-f9ff18631eea","Path":"components","Value":{"id":"ecec5b8d-d8bf-4c00-8c78-f9ff18631eea","sourceTypeId":"erp-button","model":{"guid":"ecec5b8d-d8bf-4c00-8c78-f9ff18631eea","labelText":"Call Form","id":"erp-button-ecec5"},"parentId":"div-col-049ea","layoutData":{"hostId":"div-col-049ea"}},"Operation":"Add","Index":26},{"Id":"a6c72b1b-4037-4ad5-acf0-7d204a7fad4f","Path":"components","Value":{"id":"a6c72b1b-4037-4ad5-acf0-7d204a7fad4f","sourceTypeId":"erp-text-area","model":{"guid":"a6c72b1b-4037-4ad5-acf0-7d204a7fad4f","labelText":"Callback Data","id":"erp-text-area-a6c72","noFloatingLabel":"on","epBinding":"TransView.Data","rows":5},"parentId":"div-col-049ea","layoutData":{"hostId":"div-col-049ea"}},"Operation":"Add","Index":27},{"Id":"div-col-049ea","Path":"components","Value":null,"Operation":"Move","Index":28},{"Id":"div-row-edb34","Path":"components","Value":null,"Operation":"Move","Index":29},{"Id":"pcDetail","Path":"components","Value":null,"Operation":"Move","Index":30},{"Id":"bbbdb06e-2aad-4f1e-a473-7b7f6cd2e324","Path":"components","Value":{"id":"bbbdb06e-2aad-4f1e-a473-7b7f6cd2e324","sourceTypeId":"metafx-tabstrip","model":{"guid":"bbbdb06e-2aad-4f1e-a473-7b7f6cd2e324","data":[{"id":"Page2","title":"Page 2","page":"Pag2"},{"id":"Page1","title":"Page 1","selected":true,"page":"Page1"}],"id":"bbbdb06e-2aad-4f1e-a473-7b7f6cd2e324"},"parentId":null,"layoutData":{"flexLayout":true,"hostId":"Details"}},"Operation":"Add","Index":31}],"Operation":"Replace"},"Main":{"Name":"Main","Version":"3.0","Diffs":[],"Operation":"Replace"},"Page1":{"Name":"Page1","Version":"3.0","Diffs":[{"Id":null,"Path":null,"Value":{"name":"Page1","guid":"944417ee-df81-49b9-9a12-cc953e869c47","caption":"Page 1","viewType":"TabPage","pageType":"","enableFullWidth":false,"width":1440,"height":0,"navigation":{"enable":false,"parentPage":"Details","epBinding":"","epBindingPeerOrder":10,"dataSetId":"%datasetId%","pageCaption":"","tabId":"Details"},"components":[{"id":"f30210dd-8bdf-40cb-9877-4e7c4a1b571a","sourceTypeId":"metafx-panel-card","model":{"guid":"f30210dd-8bdf-40cb-9877-4e7c4a1b571a","title":"Page 1","id":"metafx-panel-card-f3021","guidedSetup":true},"parentId":null,"layoutData":{"hostId":"Page1~components~metafx-tabstrip-bbbdb"}}]},"Operation":"Add","Index":0}],"Operation":"Add"},"Pag2":{"Name":"Pag2","Version":"3.0","Diffs":[{"Id":null,"Path":null,"Value":{"name":"Pag2","guid":"fe96081a-d4be-4591-81e4-b55a7f2259f8","caption":"Page 2","viewType":"TabPage","pageType":"","enableFullWidth":false,"width":1440,"height":0,"navigation":{"enable":false,"parentPage":"Details","epBinding":"","epBindingPeerOrder":20,"dataSetId":"%datasetId%","pageCaption":"","tabId":"Details"},"components":[{"id":"734848a0-3417-452f-b7ab-cec336d16722","sourceTypeId":"metafx-panel-card","model":{"guid":"734848a0-3417-452f-b7ab-cec336d16722","title":"Page 2","id":"metafx-panel-card-73484","guidedSetup":true},"parentId":null,"layoutData":{"flexLayout":true,"hostId":"Pag2"}}]},"Operation":"Add","Index":0}],"Operation":"Add"},"events":{"Name":"events","Version":"5.0","Diffs":[{"Id":"erp-button-929c3_onClick","Path":"","Value":{"trigger":{"hook":"onClick","type":"Control","target":"erp-button-929c3"},"actions":[{"type":"erp-function","responseParamArgs":[{"responsePath":"returnObj","viewName":"FuncRtn","paramName":"OutAddress"}],"efxLibrary":"HelperFuncs","efxPath":"Address"},{"type":"row-update","param":[{"columns":[{"epBinding":"TransView.FormattedString","expression":"","value":"{actionResult.OutAddress}"}]}]}],"id":"erp-button-929c3_onClick","mode":"U","customizable":true,"disable":false},"Operation":"Add","Index":93},{"Id":"erp-button-ecec5_onClick","Path":"","Value":{"trigger":{"hook":"onClick","type":"Control","target":"erp-button-ecec5"},"actions":[{"type":"app-open","param":{"view":"IMMT1102","layer":"Playground","openInDesignMode":false,"launchOptions":"","slideOut":true,"page":"Details","valueIn":"","onOk":[{"type":"row-update","param":[{"columns":[{"epBinding":"TransView.Data","value":"{actionResult.Data}"}]}]}]}}],"id":"erp-button-ecec5_onClick","mode":"U","customizable":true,"disable":false},"Operation":"Add","Index":94},{"Id":"erp-button-caf80_onClick","Path":"","Value":{"trigger":{"hook":"onClick","type":"Control","target":"erp-button-caf80"},"actions":[{"type":"condition","param":{"expression":"new Date(''{TransView.Date1}'').getTime() === new Date(''{TransView.Date2}'').getTime()","onSuccess":[{"type":"erp-message-handler","param":{"type":"Toast","level":"info","message":"TRUE"},"option":{}}],"onFailure":[{"type":"erp-message-handler","param":{"type":"Toast","level":"info","message":"FALSE"},"option":{}}]}}],"id":"erp-button-caf80_onClick","mode":"U","customizable":true,"disable":false},"Operation":"Add","Index":95}],"Operation":"Replace"},"rules":{"Name":"rules","Version":"3.0","Diffs":[],"Operation":"Replace"},"tools":{"Name":"tools","Version":"2.0","Diffs":[],"Operation":"Replace"},"dataviews":{"Name":"dataviews","Version":"4.0","Diffs":[{"Id":"KeyFields","Path":"","Value":{"id":"KeyFields","schema":"Erp","table":"KeyFields","serverTable":"ABCCode","disableViewChangeEvents":true,"confirmChanges":false,"staticFilter":"","isSystemView":false,"mode":"U","additionalColumns":[{"columnName":"Peter","datatype":"string"}]},"Operation":"Replace","Index":1},{"Id":"FuncRtn","Path":"","Value":{"id":"FuncRtn","mode":"U","schema":"Erp","customizable":true,"confirmChanges":true,"staticFilter":"","isSystemView":false},"Operation":"Add","Index":5},{"Id":"cdv_Callback","Path":"","Value":{"id":"cdv_Callback","mode":"U","schema":"Erp","customizable":true,"confirmChanges":true,"staticFilter":"","isSystemView":false,"datasetId":"Part","table":"Part","serverDataset":"Part","serverTable":"Part"},"Operation":"Add","Index":6}],"Operation":"Replace"}}'
WHERE TypeCode = 'KNTCCustLayer' AND Key1 = 'asd'
/* Key1 is your layer name. You can also add in Key2 for the program 
like Erp.UI.ABCCodeEntry if you have layers with the same name. 
This is up to you to isolate the single record*/

Finally, go back into App Studio (or refresh the screen) and your tabs should be reordered.

neat something GIF

Thanks a lot for the detailed steps & instructions. I have some thoughts about it, when you mentioned earlier in the chat. I will mark this as a solution to acknowledge you hard work for investigations & testing, thought, I will not prefer any direct sql updates.

I am sure, it will be easy for Epicor to implement one more property for reordering tabs. Wait for them to fix through App Studio.

I’m sure they can as well, but you’ll likely be waiting awhile for it.

FYI: May I haven’t published that layer, So I can’t see in sysahr03, but in content.


Why it shows cache? How we can clear the cached?

Type code is KNTCCustLayer not KNTCMetaUI.

Corrected. FYI: It looks like they might have changed to Content field. Purchased Advisor is already published, still I can’t get it in syscharacter03 field, but in content.

It’s not changed.
SysCharacter03 is WIP in App Studio.
Content is Published.

Leaving her other caveats in place, don’t fear. This works just fine in an updatable BAQ on that table.

Now a caveat of my own, if you do make a baq or dashboard on that table, limit how many rows you bring back by either being specific or being careful, or you may run into GDI+ errors from the BAQ designer.