cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Community Champion
Community Champion

Re: Same ID number to different SP lists

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
Highlighted
Community Champion
Community Champion

Re: Same ID number to different SP lists

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

Re: Same ID number to different SP lists

I only been using submit form

 

Didnt know there was another way as new to this

Highlighted
Helper I
Helper I

Re: Same ID number to different SP lists

eka24 Could you explain at all please?

Highlighted
Community Champion
Community Champion

Re: Same ID number to different SP lists

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.
Highlighted
Helper I
Helper I

Re: Same ID number to different SP lists

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???

Highlighted
Community Champion
Community Champion

Re: Same ID number to different SP lists

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
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,606)