I'm not sure why I'm struggling with this so much but I'm trying to do a simple dropdown control based on an ID field stored in the datasource. In this case I have a "request" table and a "statuscode" table. The request table has a statusID field which is linked to the statuscode table. Let's say there are two values for status code, "1=Open, 2=Closed". I added the code below to the default property but it doesn't appear to work. I have a record that is closed but the dropdown shows open.
This should be simple and something I will need to do often if I am going to work with database tables which often just store the ID of a foreign key instead of the display text.
If(EditForm1.Mode = FormMode.New, LookUp(StatusTable, 1 = StatusID, Status), LookUp(StatusTable, Parent.Default = StatusID, Status))