cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Posfog
Level: Powered On

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
eka24
Level 10

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
eka24
Level 10

Re: Same ID number to different SP lists

In submitting the data from the form, do you use Patch or SubmitForm
Posfog
Level: Powered On

Re: Same ID number to different SP lists

I only been using submit form

 

Didnt know there was another way as new to this

Posfog
Level: Powered On

Re: Same ID number to different SP lists

eka24 Could you explain at all please?

eka24
Level 10

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.
Posfog
Level: Powered On

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

eka24
Level 10

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
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (3,881)