
I have an app for managing projects. I have a main table "ContinuousImprovementProjects" which links to sub tables "CI Teams", "CI Milestones" and "CI updates". All the sub tables have the lookup column "ProjectID", which is the ID in the "ContinuousImprovementProjects" table.
I have a gallery listing the projects and a button to click to edit the selected project.
I have a different page for adding team members. In the form for adding/editing team members on that page, I would like to have the hidden field "ProjectID" defaulted to the ID selected in the gallery. I have made it visible now for testing. The default value of the data card for project ID is ThisItem.ProjectID. The data card value for this data card has "Items" set to Filter(Choices([@'CI Teams'].ProjectID),OLGallery.Selected.ID in Value). I saw from another post this is the way to set the Items value for a lookup column.
My issue is that once the ID is > 10, the default Project ID will have two values, the default will be 1 and the other value will be the actual ProjectID (see below). How do I get the data card to show the correct ProjectID? I have also tried setting "Items" for the data card value to Filter(Choices([@'CI Teams'].ProjectID), Value in OLGallery.Selected.ID), but the result is the same.
I managed to resolve this by setting DefaultSelectedItems of the DataCardValue as Filter(Choices([@'CI Teams'].ProjectID), OLGallery.Selected.ID exactin Value) as well.