I am creating form to have functionalities - search , edit , new records. I am using many to many table in Azure SQL.
My Data looks:
A_tbl =
[A_id:1,A_id:2,A_id:3]
- My main table
Bridge_tbl =
{A_id:1,B_ID:1},{A_id:1,B_ID:2},{A_id:1,B_ID:4}
B_tbl =
{B_id:1, nameid:”1”}, {B_id:2, nameid:”2”}, {B_id:3, nameid:”3”}, {B_id:3, nameid:”4”}
Another tble for nameid/name
Name_tbl =
{ nameid:”1”, name:”Alex”}, { nameid:”2”, name:”Ian”}, { nameid:”3”, name:”Kali”}, { nameid:”4”, name:”Kate”}
My gallery item is having view from A_tbl, Bridge_tbl, Name_tbl and retrieve the [name] rather using two lookup which is works but too slow so utilizing view. Lets call it View_Gall_tbl.
When I clicked on item on gallery - I can then show from A_tbl (using lookup in item = LookUp(View_Gall_tbl, ID = gall_app.Selected.appID)
So I can ViewForm with A_tble information with [name].
What I need now - On Edit form Mode – Patch this
From
A_id = 1 -> B_id = 1,2,4 -Multiples records in AzureSQL
To - adding one more related item
A_id = 1 , -> B_id = 1,2,4,3
Patched Kali as name in bride tble - A_ID = 1 ,
I am using combo box for [name] and retrieving related stuff – the related name has been comma joined in my view.
Sorry for confusing long question. maybe rephrase seeing responses.
Solved! Go to Solution.
So the current situation here is:
A_tbl is configured as the data source of the View form control, and based on the selection, you would like to update the bridge_tbl with one additional record, right?
If this is the case, then there is no need to take use of an EditFrom control, we could just take use of some controls to make it work.
The control that we need should be:
1. Navigate button,
2. Combo Box control for the B_tbl to hold the values for the NameId.
3. Display the confirmation of the data need to be submitted.
4. A Button to update the changes, using patch ().
Things to take a note:
A table which works in PowerApps should have Primary key defined, assuming here Bridge_tbl has a auto-generated primary key field, then the Patch function should be written as below:
patch(Bridge_tbl, defaults(Bridge_tbl), {A_id:Gallery.Selected.appID, nameid:First(ComboBox.SelectedItems).nameid})
If I understand the table structure correctly.
Regards,
Michael
So the current situation here is:
A_tbl is configured as the data source of the View form control, and based on the selection, you would like to update the bridge_tbl with one additional record, right?
If this is the case, then there is no need to take use of an EditFrom control, we could just take use of some controls to make it work.
The control that we need should be:
1. Navigate button,
2. Combo Box control for the B_tbl to hold the values for the NameId.
3. Display the confirmation of the data need to be submitted.
4. A Button to update the changes, using patch ().
Things to take a note:
A table which works in PowerApps should have Primary key defined, assuming here Bridge_tbl has a auto-generated primary key field, then the Patch function should be written as below:
patch(Bridge_tbl, defaults(Bridge_tbl), {A_id:Gallery.Selected.appID, nameid:First(ComboBox.SelectedItems).nameid})
If I understand the table structure correctly.
Regards,
Michael
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
186 | |
55 | |
42 | |
36 | |
33 |
User | Count |
---|---|
259 | |
78 | |
74 | |
71 | |
68 |