onsdag 11. mai 2016

New datasource don't show up in listpage

Sometimes when adding a new datasource to a query for a listpage, the datasource won't show up in
under form datasources of the listpage. 
When expanding the "query" node of the form I can see my new datasource - but it's missing on the form.


Sometimes it is adequate to restore the form or re-select the query in the datasourcenode of the form. 
Resent these steps did not work out for me. 


I managed to add the new datasource by exporting the listpage to xpo and edit it in notepad.
By duplicating the last datasource node and replacing the Name and TableName properties with my new datasourcename. I was able to import the xpo file and get access to the datasource from formcontrols.



Listpage after xpo-import







tirsdag 26. november 2013

Dimension value lookup step-by-step

This first post contains two small steps for creating a dimension value lookup on a form control.

1. Create a class (MyLookup) which inherits SysLookup and override the lookupDimension() method with the following code.
public static lookupDimension(FormStringControl _stringControl, 
                              Name              _dimensionName)
{
     SysLookup::lookupDimension(_stringControl, _dimensionName);
}

2. Override the lookup method of the formcontrol.
public void lookup()
{
    MyLookup::lookupDimension(this, 'CostCenter');
}