question

Upvotes
Accepted
1 0 0 0

Hi All, User is using the below script under HeidiSQL and data items are TR.EventStartDate but the result is getting not right where the result is giving an incorrect date(01/01/0001)


Hi All,

User is using the below script under HeidiSQL and data items are TR.EventStartDate but the result is getting not right where the result is giving an incorrect date(01/01/0001).

INSERT INTO `custom_scripts` (`Script_Name`, `Script_Type`, `Script_Index`, `Users`, `Source_Code`) VALUES ('MonthPctChange Column', 2, 3, NULL, 'using System;\r\nusing System.Collections.Generic;\r\nusing System.Text;\r\n\r\nusing API;\r\n\r\npublic class MonthPctChangeColumn : ICustomPositionColumn\r\n{\r\n public string ColumnName\r\n {\r\n get { return "MONTH % CHANGE"; }\r\n }\r\n\r\n public Type DataType\r\n {\r\n get { return typeof(decimal); }\r\n }\r\n\r\n public object GetColumnValue(IPosition posn, IPositionRow row)\r\n {\r\n return CustomPositionDataManager.GetFeedDecimal(posn.Security.SN, posn.Security.TickerSN, "MonthPctChange");\r\n }\r\n}\r\n\r\n');
INSERT INTO `custom_scripts` (`Script_Name`, `Script_Type`, `Script_Index`, `Users`, `Source_Code`) VALUES ('NextEarningsDate Column', 2, 1, NULL, 'using System;\r\nusing System.Collections.Generic;\r\nusing System.Text;\r\n\r\nusing API;\r\n\r\n/// <summary>\r\n/// Sample custom column code\r\n/// </summary>\r\npublic class NextEarningsDateColumn : ICustomPositionColumn\r\n{\r\n public string ColumnName\r\n {\r\n get { return "NEXT EARNINGS DATE"; }\r\n }\r\n\r\n public Type DataType\r\n {\r\n get { return typeof(DateTime); }\r\n }\r\n\r\n public object GetColumnValue(IPosition posn, IPositionRow row)\r\n {\r\n return CustomPositionDataManager.GetFeedDate(posn.Security.SN, posn.Security.TickerSN, "NextEarningsDate");\r\n }\r\n}\r\n\r\n');
INSERT INTO `custom_scripts` (`Script_Name`, `Script_Type`, `Script_Index`, `Users`, `Source_Code`) VALUES ('WeekPctChange Column', 2, 2, NULL, 'using System;\r\nusing System.Collections.Generic;\r\nusing System.Text;\r\n\r\nusing API;\r\n\r\n/// <summary>\r\n/// Sample custom column code\r\n/// </summary>\r\npublic class WeekPctChangeColumn : ICustomPositionColumn\r\n{\r\n public string ColumnName\r\n {\r\n get { return "WEEK % CHANGE"; }\r\n }\r\n\r\n public Type DataType\r\n {\r\n get { return typeof(decimal); }\r\n }\r\n\r\n public object GetColumnValue(IPosition posn, IPositionRow row)\r\n {\r\n return CustomPositionDataManager.GetFeedDecimal(posn.Security.SN, posn.Security.TickerSN, "WeekPctChange");\r\n }\r\n}\r\n\r\n');


INSERT INTO `quote_vendor_fields` (`Quote_Vendor`, `Security_Type`, `Internal_Field_Name`, `Feed_Field_Identifier`, `Feed_Alternate_Field_Identifier`, `Field_Type`, `Input_Value`, `Multiplier`, `Request_Type`) VALUES (37, 'Stock', 'NextEarningsDate', 'TR.EventStartDate', NULL, 10, NULL, NULL, 1);
INSERT INTO `quote_vendor_fields` (`Quote_Vendor`, `Security_Type`, `Internal_Field_Name`, `Feed_Field_Identifier`, `Feed_Alternate_Field_Identifier`, `Field_Type`, `Input_Value`, `Multiplier`, `Request_Type`) VALUES (37, 'Stock', 'MonthPctChange', 'TR.PricePctChgMTD', NULL, 9, NULL, NULL, 1);
INSERT INTO `quote_vendor_fields` (`Quote_Vendor`, `Security_Type`, `Internal_Field_Name`, `Feed_Field_Identifier`, `Feed_Alternate_Field_Identifier`, `Field_Type`, `Input_Value`, `Multiplier`, `Request_Type`) VALUES (37, 'Stock', 'WeekPctChange', 'TR.PricePctChgWTD', NULL, 9, NULL, NULL, 1);


workspace#technologyapi
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Upvotes
Accepted
27k 65 17 14

Hello @suresh.babu

I have reviewed the question, and I am not quite sure if it related to any LSEG Desktop APIs. Could you please confirm whether the client uses the following APIs to get data from Workspace (assuming from the TR.X field)

If the question is related to how to connect the Workspace Desktop application with the HeidiSQL tool, I am afraid it is out of this Q&A forum scope. I strongly suggest you contact the Workspace support team or HeidiSQL tool community website.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.