Hi Community,
I have a SharePoint List named Header and another SharePoint List named Details. Header is a report header which has fields such as Title, HeaderID1, TotalClaimAmount, ClaimSubmission Date. Details shows the individual expense items under the header.
In PowerApps, I have a HomePage screen shown below. The gallery is from Header. The idea is that once I click on ">" icon, it will bring me to another screen with individual expense details from the report.
This is what I get when I click on the Homepage to navigate to the report details. The bottom half of the screen is a gallery with datasource Details. It should extract from Details all the expense details under the same report. All expense details are set to have the same ID as the report they are under.
Under Total Claim Amount, it should display the total claim amount shown in Header, after doing a match between the ID under Summary.Selected and HeaderID1 under Header.
I do not know how to write the formula for this. I tried Filter(Header, Summary.Selected.ID = Header1) but I do not know how to include TotalClaimAmount in.
Kindly advise. Thank you!
Solved! Go to Solution.
Hi @elleeyl ,
Do you mean that: in homescreen, you have a gallery for Header, you want to display related Details items based on the selection of homescreen?
If so, I suggest you set the buttom gallery's Items in individual expense details screen:
Filter(Details,ID=galleryhomescren.Selected.HeaderID1)
set the top display form in individual expense details screen:
datasource: Header
Item :
galleryhomescren.Selected
Then, in individual expense details screen, the top place will display the item of Header that you select in homescreen.
The buttom place will display the filtered Details items.
Best regards,
Hi @elleeyl and @v-yutliu-msft
I just wanted to add some clarification here. The ID field is generated by SharePoint and is unique...each item in a list will have a different ID. You said that "All expense details are set to have the same ID as the report they are under" but I think you must mean that all the Details records have another field that contains the ID of the Header that they are related to. Is that the field that is called HeaderID1 and is it on the Details list?
I'm presuming that it is the Gallery on the Home Page that you are referring to as "Summary".
If so, your bottom gallery will need to use that column name for the Gallery's items:
e.g
Filter(Details,HeaderID1=Summary.Selected.ID)
Are you trying to calculate the value of Total Claim Amount from the list of details that are related to this Header, or are you trying to display the value from the selected Header record?
-
Hi @elleeyl ,
Do you mean that: in homescreen, you have a gallery for Header, you want to display related Details items based on the selection of homescreen?
If so, I suggest you set the buttom gallery's Items in individual expense details screen:
Filter(Details,ID=galleryhomescren.Selected.HeaderID1)
set the top display form in individual expense details screen:
datasource: Header
Item :
galleryhomescren.Selected
Then, in individual expense details screen, the top place will display the item of Header that you select in homescreen.
The buttom place will display the filtered Details items.
Best regards,
Hi @elleeyl and @v-yutliu-msft
I just wanted to add some clarification here. The ID field is generated by SharePoint and is unique...each item in a list will have a different ID. You said that "All expense details are set to have the same ID as the report they are under" but I think you must mean that all the Details records have another field that contains the ID of the Header that they are related to. Is that the field that is called HeaderID1 and is it on the Details list?
I'm presuming that it is the Gallery on the Home Page that you are referring to as "Summary".
If so, your bottom gallery will need to use that column name for the Gallery's items:
e.g
Filter(Details,HeaderID1=Summary.Selected.ID)
Are you trying to calculate the value of Total Claim Amount from the list of details that are related to this Header, or are you trying to display the value from the selected Header record?
User | Count |
---|---|
179 | |
118 | |
87 | |
44 | |
41 |
User | Count |
---|---|
243 | |
154 | |
128 | |
77 | |
72 |