Hello. I'm facing an issue with setting the default value of a Lookup column. My datasource is a SharePoint list. I have a parent/child relationship between two lists. For example, I have a "Projects" list and another "Time" list with a lookup column pointing to the Projects lists so you can put time in for a particular project. On my New Form for the Time List in PowerApps I want to auto-populate the Project Lookup column with the currently selected Project that I have as a global variable in PowerApps. I thought I could do this by setting the Default Value of the Lookup Data Card to this:
{
'@odata.type' : "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id: varWO,
Value: varWO
}
It looks like in the Preview it is setting the value correctly, however, when I submit no record is added to the list and I see an error that "A value must be provided for item".
Has anyone else ran into this? Is this a bug? This project needs to be done by Friday morning and this is the last thing I have to do to get it done and I'm out of ideas. I even tried just creating a single line of text field and trying to auto-populate that with my global variable. That will create a record but with a blank column value.