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

Parent/Child New Form question/issue

Hello! I have a Parent/Child New Form question/issue
 
I have two sharepoint lists. One called Projects (id, name, status, etc) and the other one called ProjectTasks (id, project_id, name, etc). The ProjectTasks list has a reference field called project_id, which I am using for the Parent/Child relationship between the projects and the tasks. So the projects can have many tasks.

 

The App that I created is very simple; it has a  GalleryProject screen where you can see all the projects. If you go into a projects, you can view the project details; and if you click on the tasks icon you can see all the tasks related to the project. Ideally, I would like to be able to create new task and make sure that this new task is referenced back to the project_id. (parent).  
 
I have a screen called NewTask where I have a NewTaskFrom with all the Task information, including a Drop Down called Project_ID that list all the projects (remembers, this is a reference field to Projects list)

 

Show ProjectShow ProjectList Related task and Add new Task ButtonList Related task and Add new Task ButtonAdd new Task form and Parent IDAdd new Task form and Parent ID
 

 
The challenge I am having is that I am unable to set/ auto-selected the NewTaskFrom.Project_ID dropdown with the ProjectGallery.Selected.ID.
 
I tried to change the Default value to “ProjectGallery.Selected.ID” which it seems to work. However, when I try to submit the form I get an error as if the Project_ID dropdown is empty.  I have tried many things, but still have not been able to do it. 
 
I was wondering if anyone had the same issue and can share a workaround. Thanks!

24 REPLIES 24
Community Support Team
Community Support Team

Re: Parent/Child New Form question/issue

Hi javierC,

 

Please try to use Lookup function within your code.


You could configure the Dropdown control’s Default property as:
LookUp(Projects,Id=BrowseGallery1.Selected.Id)


Please try it on your side to see if this will work for you.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
javierC
Level: Powered On

Re: Parent/Child New Form question/issue

Hello! Thanks for your answer.

it seems that It does select the Project ID; however, does't work when i submit the new Task. 

I get a RED error message on top of the page, as if Project ID drop down was empty.

 

Please see images.....

Error1.pngDesign

 

 

Error2.pngrun app and enter data

 

 

Error3.pngClicked on Submit button and got error

 

 

Error4.pngClick on Parent ID dropdown and show no results

 

 

 

 

 

javierC
Level: Powered On

Re: Parent/Child New Form question/issue

I also tried adding bellow to the default property. 

 

{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference", Id: ProjectList.Selected.ID, Value: ProjectList.Selected.Title}

 

The select dropdown populate the data and set the Value i want; however...i stil get the error mesage on top when i submit the form. Same error as shown above in the pictures....

javierC
Level: Powered On

Re: Parent/Child New Form question/issue

Anyone please!

I will apreciate any helppppp!

Please!!

javierC
Level: Powered On

Re: Parent/Child New Form question/issue

anyone?

CW
Level: Powered On

Re: Parent/Child New Form question/issue

Me too. Do you hear the crickets?

PowerApps Staff CWesener
PowerApps Staff

Re: Parent/Child New Form question/issue

 

Adding @emmac from the Studio team and @GregLi for Expressions who can help you here.

Thanks,
Clay.
CW
Level: Powered On

Re: Parent/Child New Form question/issue

Thanks CWesener!!! I've been trying to figure this out for months and keep breaking things. We all simply need examples. No one has time to read through all the documents then try and figure out what applies to the situation.

 

It says no code but that's just a matter of symantics. There are a few examples but like usual, never related to real world issues where child items are based on lookups from the parent. I could teach someone to, say, cook a meal but refer to every ingredient in biochemical and physical chemical terms including all required temperatures and pressures. Most owuld looka **bleep** and say are you bleeping kidding? Wow great for you you understand this but creating a meal and eating is something we all should be able to do. Do you really think they're going to learn anything much less be excited about making a great meal? NOT.

 

Very simple: One form with data, a child form with data O(mostly lookups, how do you edit the child items then submit back. Are you supposed to use clearcollect or does it matter? That's why example templates doing precisely this would make everyone's life much easier, stop our Microsoft bashing and complaining and acheive better buy-in by users because my patience with this technology is running very very thin and have even thought very strongly about using something a bit more user friendly.

 

Thanks again.

CW
Level: Powered On

Re: Parent/Child New Form question/issue

So, ummmmm, so anyway.

 

chirp chirp chirp.

 

Maybe powerapps cant do it and it's all just talk? I guess if it were possible there'd be examples.

 

Hey folks, possibly take a look at K2 for this since we dont seem to be getting anywhere here. https://www.k2.com/

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 428 members 5,259 guests
Please welcome our newest community members: