How to Fetch queryValue from Syslastvalue

Hi Friends,

Here is the requirement, From form using ctrl+F3 user can save the query in syslastvalue [Lets say Qry:64_64V]. When I open the form next time I need to show all the saved query in a combobox in the form. When user selects any of the saved query the form should execute according to it.

I managed to get the user saved query name from the sysLastValue, but I am not able to get the query from it.

Select SysLastValue

Where SysLastValue.userId == curUserId()

&& SysLastValue.company == curext()

&& SysLastValue.recordType == UtilElementType::UserSetupQuery

&& SysLastValue.designName == #OrderManagementview;

SavedQueries.add(ā€™ā€™); // Add Blank to the comboBox

if(SysLastValue)

{

//if SysLastValue has record get the value fron sysLastValue table into container

savedqryContainer = SysLastValue.value;

//Loop through the container and find the name of the saved query

for(i = 3; i<= conlen(savedqryContainer);i++)

{

if (conPeek(conPeek(savedqryContainer,i),1) != #lastUsed)

{

name = conPeek(conPeek(savedqryContainer,i),1);

SavedQueries.add(name);

}

}

Can any one help tp get the query saved for each name.

Hey SivaKumar,

Iā€™m moving this post to the developer forum. Hopefully some more developer-type people will see it and be able to chime in!

Also, could you add some tags to more easily categorize your issue?

Thanks,

Jake