web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to handle data bet...
Power Apps
Answered

How to handle data between 2 Sharepoint lists

(0) ShareShare
ReportReport
Posted on by 56

Hello,

 

I have 2 SharePoint lists,

 - IT_Request,      (it contains information about all IT requests)

 - IT_Acceptance

 

I expected to create the new item in 'IT_Acceptance' by loading the data from 'IT_Request'. The idea is,

1. I created the screen 'BrowseScreen' to search the items are ready for acceptence;

   DataSource: IT_Request

   BrowseGallery1.Item = SortByColumns(Filter([@IT_Request], Status.Value = "Yes" && !Acceptance ), "PO_num", If(SortDescending1, Descending, Ascending))

BrowseScreen.jpg

 2. There is the 2nd screen for detail of item.

   DataSource: IT_Request

Detail.jpg

3. After confirmed the information, it goes to the 3rd Screen 'Go for Acceptance', the form name is 'EditForm1'

   DataSource: IT_Acceptance

  I set .default of the DataCardValue to load data from the DataCardValues from the Screen 'Detail' (from DataSource: IT_request)

ToAcceptance.jpg

I have no idea how to set EditFrom1.Item, so I leave it blank. But I cannot see the data in this form when I test it.

No data.jpg

So I have 2 questions,

1. How to make this form visible?

2. After I SubmitForm(EditForm1), the new item will be created in 'IT_Acceptance', right?

 

Thanks a lot

CirleMi

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @CircleMi 

    If the form is in Edit mode and you already have data in it as indicated by the Detail screen, then the Item property of the form should be

    Lookup([@IT_Request], ID = BrowseGallery1.Selected.ID) 

    If a form is in Edit mode then a valid Item property must be included or the form will be blank.  When the form is in New mode, the Item property is ignored.

  • CircleMi Profile Picture
    56 on at

    Hello @Drrickryp ,

     

    When I set ITEM as you mentioned, the system shows an error 'Invalid Formular'. It seemed that I cannot set another DataResource(IT_Request) in Lookup function than the original DataResource(IT_Acceptance) I set for this EditForm.

     

    Thanks for your support

    CirleMi

  • Verified answer
    v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @CircleMi ,

    Do you want to use selected data in IT_Request to create a new item in  IT_Acceptance?

    If so, I suggest you know more about form.

    Please notice these things:

    1)to update which list is decided by the form's data source
    2)whether to create a new item or update an existing record is decided by the form's more

    3)you just need to use submitform() function to create a new item or update an existing record

    4)if your form's mode is edit, you need to set the form's Item property to one item in your data source. Or else the form will display "no item to display", just as your screen shoot.

    if your form's mode is new, you do not need to set the form's Item. 

    5)you have two solutions to change a form's mode:

    set the form's DefaultMode:

     

    FormMode.New /FormMode.Edit /FormMode.View

     

    use a trigger to change the form's mode by using formula like this:

     

    NewForm(formname) /EditForm(formname) /ViewForm(formname)

     

     

     

    Let us back to see your issue.

    Since you want to update IT_Acceptance, so please set the form's data source to :

     

    IT_Acceptance

     

    Since you want to create a new item, so please set the form's DefaultMode to :

     

    FormMode.New

     

    Since the form's mode is new, you do not need to set the form's Item property.

    Since you want some fields display as the selected item data in IT_Request, so you need to set the datacards' Default.

    For example:

    set PO_num datacard's Default:

     

    BrowseGallery1.Selected.PO_num

     

    set Model datacard's Default:

     

     

    BrowseGallery1.Selected.Model

     

     

    set Quantity datacard's Default:

     

     

    BrowseGallery1.Selected.Quantity 

     

     

    set the submit button's OnSelect:

     

    SubmitForm(formname)
    //please replace with your form's name

     

    Since your form's mode is new, so yes, you will create a new item.

     

     

     

    Best regards,

  • CircleMi Profile Picture
    56 on at

    @v-yutliu-msft 

    Thanks a lot for your very clear information.

    Yes, the DataResource is "IT_Accepetace' at the begining and I changed the default mode to 'New' for the form. The data for the datacards can be shown in Power Apps. But when I tested the form, the information in this form is still not visible (please refer to the touble screenshot in my original post).

    NewForm.jpg

    Did I make anything wrong?

     

    Thanks

    CircleMi

  • CircleMi Profile Picture
    56 on at

    @v-yutliu-msft 

    Ah, I found the reason. The button(OnSelect) which navigate to the Editform1 was defined as EditForm(EditForm1);Navigate(EditScreen1, ScreenTransition.None).

    Now I changed to NewForm(EditForm1);Navigate(EditScreen1, ScreenTransition.None), then it's fine to show the data.

     

    Thanks a lot

    CircleMi

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 638

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard