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

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Gallery and Edit From

(0) ShareShare
ReportReport
Posted on by 14

Good day everyone!

 

I'm having and issue that I can't seem to work around. I am creating an app to manage student information. I have two separate Sharepoint lists: "Student Information" and "Program Costs". Both lists have a related column 'Student ID', of which is a LookUp Column under the "Program Costs" list. I've created a Gallery with the Student Information list and I am trying to have two screens, one showing an edit form for Student Information columns and another showing and edit form for the Program Cost columns. What I am trying to do is have the Program Cost edit form show information based on the selected item in the Gallery. Since the Gallery is linked to the Student Information list and the Program Cost form is linked to the Program Cost list, I was wondering how using the related column (Student ID), I can show all the information in the Program Cost form by just referencing the Student ID selected by the Gallery. 

 

I've tried several LookUp formulas in the Program Cost Item option, but I keep getting errors. The last I tried was this:

 

LookUp('Program Cost','Program Cost'.'Student ID' = Gallery1.Selected.'SIS ID')

 

I get a delegation warning and nothing shows up on the form. Any help with this would be greatly appreciated. Thank you!

 

I am wondering since the Student ID column for the Program Cost list is a lookup column and has a drop down box, it is causing an issue, but this is just a guess. 

I have the same question (0)
  • WarrenBelz Profile Picture
    151,690 Most Valuable Professional on at
    Re: Gallery and Edit From

    Hi @Eddie4763 ,

    Filters on Lookup columns are not Delegable. I suggest you add a numeric column with the Default set to the value of the Lookup column (I assume it does not change after setting initially) and do the filter on this.

    The other option is to simply make Student ID numeric or text - then it will also work fine.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

  • Eddie4763 Profile Picture
    14 on at
    Re: Gallery and Edit From

    Hello @WarrenBelz,

     

    Bare with me as I am new to this and I appreciate your help. I am trying to do what you suggested, but I am having difficulty starting. I created another column and called it "Reference ID", but the default value, when I try to make it a calculated value so it can automatically input the same value, I get an error. 

     

    Also, how can I change a LookUp column in sharepoint to number or text while maintaining the relationship?

     

    I also manually entered the same Student ID into the Reference ID and tried to use the lookup function to show the information from the Program Cost table using the selected Student ID from the Gallery that is tied to the Student information table and it didn't work. What should the formula look like in the Program Cost form Item function? 

  • WarrenBelz Profile Picture
    151,690 Most Valuable Professional on at
    Re: Gallery and Edit From

    Hi @Eddie4763 ,

    The principle of what I am trying to do I believe will assist, but I have discovered a slight flaw in the method as a test I just did in SharePoint does not update the default for the lookup column, however this can be done in PowerApps when the StudentID is selected. You can Patch this for an exiting record, but for a new one, it is easy to have the reference field card on the form (you can hide it) and make the Default the control value result of the StudentID drop-down and it should populate. You need to wrap the reference in Value() as the result is Text. Lookup column results are generally .Value so if the StudentID control was named ddStudent, the Default of the reference field control would be

    Value(ddStudent.Selected.Value)

    When you say you manually entered it and it did not work, was the field numeric and how did you save it to your data source?

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Eddie4763 Profile Picture
    14 on at
    Re: Gallery and Edit From

    @WarrenBelz 

     

    I attempted to set the default of the control to the StudentID, but I get a value of '0' in the reference control....I'm I doing something wrong?

     

    Value(SISID.Selected.Value)

     

     

  • WarrenBelz Profile Picture
    151,690 Most Valuable Professional on at
    Re: Gallery and Edit From

    You also need to Reset the control - on the OnChange of the drop-down, put Reset(ControlName) where this is the other field control.

  • Eddie4763 Profile Picture
    14 on at
    Re: Gallery and Edit From

    I get the same result, unfortunately.

     

    The preview of the formula mentioned states this:

     

    Value(SISID.Selected.value) = 0 | Data type: number

  • Eddie4763 Profile Picture
    14 on at
    Re: Gallery and Edit From

    @WarrenBelz 

     

    I also forgot to mention that the Student ID contains numbers and letters

  • WarrenBelz Profile Picture
    151,690 Most Valuable Professional on at
    Re: Gallery and Edit From

    OK  @Eddie4763 ,

    Then the other field needs to be Text (single line) and you can drop the Value() from around the formula.

  • WarrenBelz Profile Picture
    151,690 Most Valuable Professional on at
    Re: Gallery and Edit From

    Hi @Eddie4763 ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Eddie4763 Profile Picture
    14 on at
    Re: Gallery and Edit From

    @WarrenBelz 

     

    I still havent been able to get the gallery from another list to populate the Lookup column of a form from another list. It is driving me crazy. From what I can tell, Powerapps and Lookup columns dont get along too well. I am thinking of just creating a flow that will just autopopulate the related column once a new Student ID is created and removing the Lookup configuration all together. Thoughts?

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 629 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 397 Super User 2025 Season 2

#3
wolenberg_ Profile Picture

wolenberg_ 232 Moderator

Last 30 days Overall leaderboard