I have a drop down control, which i connected to datasource which is a view in Sql Azure;
CREATE VIEW dbo.Area_types
AS
SELECT Id, Value
FROM dbo.Lookup
WHERE (Type = 6)
The ID is the primary key and the Value is the Diplay Name. eg 1 = Kitchen, 2 = Bathroom
I want the drop down to diplay Kitchen, Bathroom.
When I want to Patch to a table called Job_Pictures I want to use the primary key. Seems like a simple job, but been at it for some time :).
Patch('[dbo].[Job_Pictures]';Defaults('[dbo].[Job_Pictures]');{The_image:Camera1.Photo; Job:Job; Type_of_area:Dropdown2.Selected }))
CREATE TABLE [dbo].[Job_Pictures] (
[Id] INT IDENTITY (1, 1) NOT NULL,
[Job] VARCHAR (40) NULL,
[Job_task] INT NULL,
[The_image] VARCHAR (MAX) NULL,
[Type_of_area] SMALLINT NULL,
PRIMARY KEY CLUSTERED ([Id] ASC)
);
Solved! Go to Solution.
Hi @jamess
I think you're just missing the Id property from the selected item of your dropdown. Hopefully, this will work a better for you.
Patch('[dbo].[Job_Pictures]';
Defaults('[dbo].[Job_Pictures]');
{The_image:Camera1.Photo;
Job:Job;
Type_of_area:Dropdown2.Selected.Id
}
)
Hi @jamess
I think you're just missing the Id property from the selected item of your dropdown. Hopefully, this will work a better for you.
Patch('[dbo].[Job_Pictures]';
Defaults('[dbo].[Job_Pictures]');
{The_image:Camera1.Photo;
Job:Job;
Type_of_area:Dropdown2.Selected.Id
}
)
User | Count |
---|---|
246 | |
105 | |
82 | |
50 | |
43 |