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 / Lookup on Milestone Pr...
Power Apps
Unanswered

Lookup on Milestone Project

(0) ShareShare
ReportReport
Posted on by 4

Hi 

I'm trying to create a new work item at the point of creating a new project  however the Lookup function is error for the MIlestone Collection

 

locNewWorkItem: Patch(
'Project Work Items',
Defaults('Project Work Items'),
{
Name: "Solution Design",
'Team Member': cmbAddWorkItemTeamMember.Selected,
Category: cmbAddWorkItemCategory.Selected,
Description: "Supporting documentation for Gate 1",
ETA: datAddWorkItemTargetDate.Value,
Milestone: LookUp(colNewProjectMilestones,Order=1),
Priority: cmbAddWorkItemPriority.Selected,
Project: gblProject,
'Work Item Status': LookUp(
'Project Work Item Statuses',
'Project Work Item Status' = cmbAddWorkItemStatus.Selected.'Project Work Item Status'
)
}

 

The message is "Your formula is missing a column "Owner"

Categories:
I have the same question (0)
  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at

    Hi @amun10001

     

    Thank you for trying out the Milestones app. I created that app so hopefully will be able to guide you here. Are you trying to create a new work item for every milestone when creating a project or just for the 1st milestone?

     

    This Patch will have to be after the Patch that creates the project and the milestones. You can then do something like this in the above Patch for work items:

    Milestone: First(LookUp(Projects, Project = gblProject).Milestones)

    I don't have the app open in front of me but the assumption in my expression above is the gblProject is the variable in which the newly created project is stored. 

     

    Let me know if this helps. 

     

    ---
    If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

     

    Thanks!

    Hardit Bhatia

    Microsoft Business Applications MVP

    Microsoft Certified Trainer MCT

    Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

  • amun10001 Profile Picture
    4 on at

    Hi - thanks for the reply

    Yes I am trying to create a new work item at the point of creating the project

    Work Item: Solution Design 

    Milestone: Gate 1

    Work Item: Project Plan

    Milestone: Gate 1

    Are yo usaying that I need call the function post creating the project

     

    [Update]

    I've inserted it at the point of creating the project and now have the following errors

    Milestone1.png

     

  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at

    The "Create" button that creates a project will need the following code at the end to create two new work items for Milestone 1 (Solution Design and Project Plan): 

    Patch(
     'Project Work Items',
     Defaults('Project Work Items'),
     {
     Name: "Solution Design",
     'Team Member': cmbAddWorkItemTeamMember.Selected,
     Category: cmbAddWorkItemCategory.Selected,
     Description: txtAddWorkItemDesc.Text,
     ETA: datAddWorkItemTargetDate.Value,
     Milestone: First(gblProject.Milestones),
     Priority: cmbAddWorkItemPriority.Selected,
     Project: gblProject,
     'Work Item Status': LookUp(
     'Project Work Item Statuses',
     'Project Work Item Status' = cmbAddWorkItemStatus.Selected.'Project Work Item Status'
     )
     }
    );
    Patch(
     'Project Work Items',
     Defaults('Project Work Items'),
     {
     Name: "Project Plan",
     'Team Member': cmbAddWorkItemTeamMember.Selected,
     Category: cmbAddWorkItemCategory.Selected,
     Description: txtAddWorkItemDesc.Text,
     ETA: datAddWorkItemTargetDate.Value,
     Milestone: First(gblProject.Milestones),
     Priority: cmbAddWorkItemPriority.Selected,
     Project: gblProject,
     'Work Item Status': LookUp(
     'Project Work Item Statuses',
     'Project Work Item Status' = cmbAddWorkItemStatus.Selected.'Project Work Item Status'
     )
     }
    )

    Since users are not going to picking values for assigned to, status, priority etc., you can hard code those values based on your requirements. Let me know if this helps. 

     

    ---
    If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

     

    Thanks!

    Hardit Bhatia

    Microsoft Business Applications MVP

    Microsoft Certified Trainer MCT

    Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

  • amun10001 Profile Picture
    4 on at

    Hi 

    still getting the same error with the First(gblProject.Milestones) line - all other values are fine but i will need to apply the logic as milestones to Category and Status

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard