cancel
Showing results for 
Search instead for 
Did you mean: 
hpkeong

CRUD in Single-Page (Tablet Mode)

Monday’s Guru Best Practice:

 

PowerApps Group has provided an excellent Phone-Layout 3-Screens CRUD Apps and generate automatically using existing data.

 

For PC-Tablet Layout, it is yet to be included by PowerApps Group.

 

Nevertheless, 3-Screens CRUD may NOT be so practical for Big-Screen devices. Hence, I have resorted to making app for PC-Tablet Layout with ONE-SCREEN CRUD, so that it looks neat, faster response, no-navigation and hopefully, with less resources used, the apps will response much more smoothly.

 

Step 1:

- Create a Database, e.g: TableMMD

 

Typical Equipment Reg List (as of ISO 9001: 2015 QMS 7.1.5)Typical Equipment Reg List (as of ISO 9001: 2015 QMS 7.1.5)

 

Step 2:

- Design a simple Layout, with:

  • Title, BackButton and AddNewButton
  • Headers for each fields
  • Gallery with TextInputs
  • Gallery with DataSource, EditButton (To cover the whole record, with No-Fill Color)
  • SaveButton & CancelButton

 

UI Layout ConceptUI Layout Concept

 

Step 3:

 

Connection to DataSource - TableMMD

 

Link to datasource:

Gallery.Items (DataSource😞

TableMMD

 

Screen.OnVisible:

UpdateContext({rst: false}); UpdateContext({rst: true, EquipMLH: 664, EquipMLY: 104, AddPopUp: false})

 

Gallery.Items (with TextInput):

Table(EditEquipMaster))

TextInput.Reset: rst

 

 

Y: EquipMLY

Height: EquipMLH

[Purpose: to Re-Size Gallery to show/cover Gallery(TextInput) Area]

 

Button.OnSelect:  [Inside Gallery.Items (DS), Color: No-Fill]

UpdateContext({AddPopUp: true, EquipMLY: 166, EquipMLH: 602, EditEquipMaster: ThisItem})

 

Button.Fill:

If(ThisItem.IsSelected, RGBA(255, 255, 1, 0.2), RGBA(0, 0, 0, 0))

Click On (Invisible Button): Any Record (inside Gallery (DS)

- SaveButton & X Button will Show-Up (Visible)

- Edit Data inside TextInput

- The selected record will be highlighted with color (e,g. here: LightYellow)

 

 

AddButton.OnSelect:

UpdateContext({AddPopUp: true, EquipMLH: 602, EquipMLY: 166}); UpdateContext({EditEquipMaster: Defaults(TableMMD)})

 

Click On: Add Icon

- SaveButton & X Button will Show-Up (Visible)

- Add Data inside TextInput

 

SaveButton.OnSelect: [Red Font: Saving Formula; Can be Replaced with SubmitForm & other saving method]

Patch(TableMMD, EditEquipMaster, {No: If(!IsBlank(TableMMD.No), EditEquipMaster.No, Text(Max(TableMMD, No) + 1)), Serial_No: TextInput3_14.Text, Controlled_No: TextInput3_15.Text, Equipment_Name: Proper(TextInput3_21.Text), Brand: Proper(TextInput3_22.Text), Manufacturer: Proper(TextInput3_23.Text), Model_No: TextInput3_24.Text, Location: Proper(TextInput3_25.Text)}); UpdateContext({AddPopUp: false, EquipMLH: 664, EquipMLY: 104})

CrossButton.OnSelect:

UpdateContext({AddPopUp: false, EquipMLH: 664, EquipMLY: 104})

 

Call-Out / Bubble with explanationsCall-Out / Bubble with explanations

 

Final Thought

 

PowerApps is the perfect tools in creating ERP / Productivity Program in manufacturing. Combination with Mobile Apps to expedite workaround input will expedite the whole data capturing and data analysis process.

 

Challenge Point....

- DeleteButton: may interested parties add a DeleteButton (next to Save Button and Cancel Button) with formula to deleted selected record.

Comments