cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Posfog
Helper I
Helper I

Same ID number to different SP lists

Hi All, Just need some advice on the following if possible?
I have created 2 SP Lists, both lists have a ID column, which populates its self.
Ive also built a app that submits data to both lists at the same time from a single screen but when i check the data each list has a different ID number entered.
I really need for these to be the same so when i use PowerBi, As for what i can understand is for the relationships to work between data contained on multiple SP lists does the ID columns need to match
 
 
So when i have set the relationship to ID on PowerBI the data for the Hazard and comments and showing under (Blank) for slicers that control Zone,Station and Date.
 
 
E.g. PowerApp page is sending to two lists 
List 1: Zone,Station and Date 
List 2: Hazard and Comments
 
Kind Regards
P
1 ACCEPTED SOLUTION

Accepted Solutions

Making Use of the LastSubmit function to achieve sending record to two table at the same time. This is to ensure same ID field reflect in the two tables. We would use ZA_Hazard_List as the main table which would replicate ZA_Cost. Since both have similar fields. Let Follow this:

  1. Insert a form – ZAHarzardFfrm and pick the datasource ZA_Hazard_List
  2. Copy and paste the form to duplicate it. Then change the Datasource to ZA_Cost. Rename the form to FormZACost

    3. Set its Item property to FormZACost.LastSubmit. The idea is to collect all data submitted to ZA_Hazard_List    immediately.

    This way, the User will not have to re-enter any data again.
   4. Change the Displaymode of the ID Field to View to avoid users changing the ID.

   5. You can now insert Buttons for the submit

 

If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

 

View solution in original post

6 REPLIES 6
eka24
Super User
Super User

In submitting the data from the form, do you use Patch or SubmitForm

I only been using submit form

 

Didnt know there was another way as new to this

eka24 Could you explain at all please?

There are other ways of sending data to your datasource. One more thing, Iguess you submit form using two buttons. There are a number of options with the view that the main objective is to retain the ID for both:
1. Use Patch for the second List or table. In that case both the submit and patched at same time.
Example:
Patch( MyTable, Defaults(MyTable), {TextColumn: "Hello world", NumberColumn: 123.45})
See this
https://youtu.be/gX5q_V3U8-s

2. Use Power Automate (flow) to copy the record from one to the other.

On my App i wanted to have one button to send data to both SP lists and for both of them to have the ID number from my main SP list, but i dont think patch will work for this??

 

just thinking now if i had two fields on both SP lists where i use Concatenate and create unique items from other populated items???

Making Use of the LastSubmit function to achieve sending record to two table at the same time. This is to ensure same ID field reflect in the two tables. We would use ZA_Hazard_List as the main table which would replicate ZA_Cost. Since both have similar fields. Let Follow this:

  1. Insert a form – ZAHarzardFfrm and pick the datasource ZA_Hazard_List
  2. Copy and paste the form to duplicate it. Then change the Datasource to ZA_Cost. Rename the form to FormZACost

    3. Set its Item property to FormZACost.LastSubmit. The idea is to collect all data submitted to ZA_Hazard_List    immediately.

    This way, the User will not have to re-enter any data again.
   4. Change the Displaymode of the ID Field to View to avoid users changing the ID.

   5. You can now insert Buttons for the submit

 

If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

 

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,875)