Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Form within a Form

Posted on by 13

I have two data sources, Commissions and Tasks (1:Many) which are linked by the Commission ID.

 

On the app I have a gallery (CommissionGallery) showing a list all of the commissions, and then a form (CommissionForm) next to it which users can view/edit the commission.

Commission is split into 4 sections, one of those sections is "Tasks" and within that section I've got another gallery (TaskGallery) showing a list of the tasks for the selected Commission in CommissionGallery (shown in the first image)

 

That part is all working perfectly, having the tasks in CommissionForm means I can have the sections be collapsible instead of showing the tasks on a different screen/visible property set to show on a button etc.

 

Problem: I want to be able to view/edit the full task details in a pop-up window which includes another form (TaskForm) (see the second image). I have the item property set as TaskGallery.Selected, which works when TaskGallery is not contained within a form, but when its within CommissionForm the popup (TaskForm) shows "No item to display" when its in live mode or just blank in studio, except for the Commission ID.

 

I assume there's too many form from a gallery within another form coming from another gallery problems.

 

Apologies for the annoying blocks, hopefully it still makes sense

GeeBee185_0-1706114025507.png

GeeBee185_1-1706114414352.png

 

Categories:
  • GeeBee185 Profile Picture
    GeeBee185 13 on at
    Re: Form within a Form

    Thank you so much, I can't believe the answer was so simple but at the same time I would never have thought of that.

  • Verified answer
    timl Profile Picture
    timl 31,739 on at
    Re: Form within a Form

    @GeeBee185 

    The solution to this is to set the Item property of TaskForm to a variable (eg, varSelectedTask).

    You can then set this variable in the OnSelect property of the galleries that open TaskForm.

    Set(varSelectedTask, ThisItem)

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

October 2024 Newsletter…

October 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #4 How to Conntact Support…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 142,651

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,727

Leaderboard