OpenUI Get List of Values - controls

I am looking for a smart solution how to retrieve the Data from a LoV from a Business Component of Siebel. I tried to read the control with,...
var controls = this.GetPM().Get("GetControls");
for(var control in controls){
var value = this.GetPM().ExecuteMethod("GetFieldValue", controls[control]);
}
And with,...
this.GetPM().Get("GetRecordSet");
But the result for a LoV is still "". Is there a way without a Business Service to get the List of Values?

After a long search we got following answer,...
At the moment it is not possible. The problem is that the PM can only
see the active values of the Applet. The LoV (select in HTML) is
getting generated as soon the client clicks active on the select
element.
We build now a Business Service (BS) that provides the List of Values that i need to render.
Kind regards,
Myracle

Related

How to access individual cells of interactive grid in APEX?

I am working on an APEX application where i basically need to make some particular cells of a column read-only based on some condition during the page load. Lets say a column accepting date values. I tried using the ReadOnly attribute to do so by using the PL/SQL expression and PL/SQL function body as the options but i am not clear of the format it expects me to use. Is it possible to do it this way? If yes, then how should i proceed with it?
I also saw a way to access the cells independently through Javascript and iterate on the cells later using this...
var view$ = apex.region("----").widget().interactiveGrid("getViews").grid.view$;
where "----" is the region id. How can i find my region id if this could be one possible solution?
To make the region ID predictable, set a Static ID in the region properties.

SSRS reports dynamics crm have current record id used as parameter

Hi for my ssrs report In dynamics crm I require that when the report is ran against a certain record, the records passes the record id so that only the relevant results are displayed.
How is this possible ? Steps provided will be great also
Reports are created using SQL.
Run against campaign entity
SSRS reports for CRM have special parameters that enable this for you. To filter by selected records (or the current record you have open) you can utilise a hidden parameter called "CRM_Filtered[Entity]" where entity is the relevant entity you are linking the report to.
In your case, i.e. for the campaign entity, this hidden parameter will be called CRM_FilteredCampaign. For a SQL report this will be a text parameter and will be set to something like this (set by CRM when you run the report)
select campaign0.* from FilteredCampaign as "campaign0"
I do not have a report to hand to check exactly what the SQL will contain, so it might not be exact. But you get the idea. There are several ways to embed this in your report, but you could do so in a rudimentary fashion like this in a dataset:
declare #sql as nVarchar(max)
set #sql = 'SELECT c.campaignid FROM (' + #CRM_FilteredCampaign + ') as c'
exec(#sql)
Expanding on this, i.e. rather than executing text SQL in your main dataset, you can instead simplify the usage by creating a dataset/parameter combo based off the text. In effect, convert the SQL text to a list of values instead.
So add the above SQL to its own DataSet (for this example called DS_FilteredCampaign).
Once you have created DS_FilteredCampaign make sure you click on the Refresh Fields button. Type in the following instead of <null> for the parameter value:
select c.* from FilteredCampaign as c
Once that comes back click on Ok to save the DataSet.
Next, create another hidden text parameter (e.g. Int_FilteredCampaign) and tell it to get its default value from a DataSet (not its available values, its default value). Point the values at DS_FilteredCampaign, and you should be able to select campaignid as its value field. This in effect makes the parameter an array of Ids you can reference in your main DataSet
Now it's much more usable as you can reference it in your SQL something like this in your main DataSet:
select c.*
from FilteredCampaign c
inner join ActivityPointer ap on ...
inner join FilteredAccount a on ...
where c.campaignid in (#Int_FilteredCampaign)
The important piece being where c.campaignid in (#Int_FilteredCampaign)
Summary Steps:
You have a main DataSet called something like dsMain
Create a new parameter called CRM_FiltetedCampaign
Create a DataSet (DS_FilteredCampaign) that executes the SQL passed into CRM_FilteredCampaign
Refresh Fields on the data set to get the campaignid field
Create a text parameter (Int_FilteredCampaign) that retrieves its default value using the new dataset (DS_FilteredCampaign) using campaignid for the value
Reference this new parameter in you dsMain dataset

Getting strings from LINQ queries in Sharepoint web part?

I'm setting up a Sharepoint Web Part for tracking language translations for our various products. I can create the translations, now I'm trying to re-populate the form controls if someone chooses an item that that already has a translation, ie they select "French-ProductX" and the various texboxes populate with the data for that translation/product.
My LINQ query is pulling the right data (itemname is the product the user has chosen in a dropdown menu).
var query = from translation in Translations
where (Convert.ToString(translation.Name)) == itemname
select translation;
I can bind the query to a grid and see i'm getting the correct data, but I'm stuck after that. There are two fields (to start with) i want to pull, "Description" and "Features" as strings and fill their corresponding asp:TextBoxes.
I tried converting to array, and it still binds correctly, but it isn't indexing the fields, its viewed aa a single item of type Translation.
I tried an IEnumerable query and converting to a dataview but I got casting errors on the WHERE clause I couldn't resolve.
I tried this, but VS says 'myitem" is an unassigned local variable.
var query = from translation in Translations
where (Convert.ToString(translation.Name)) == itemname
select new { myitem = translation.Description, features = translation.Features };
ItemDescription.Text = myitem;
This seems like it should be a simple thing, am I just missing something here?
What's happening is you are getting an IEnumerable of an anonymous type with the properties of myitem and features.
You would need to change the last line to:
ItemDescription.Text = query.First().myitem;

Dropdown with Checkbox in SSRS

I have a report in SSRS which is generated for around 50-60 items.
Say, the report shows Country name on one scale and their population on another.
When the graph is generated, it shows around 100 countries.
If I want to see population of only UK, US, India and China. Then I Should have an option to select the countries of my choice.
Having one dropdown and allowing them to select only one country at a time is simple.
I have no idea on how I can have a checkbox in dropdown to allow multiple selections.
TIA.
You'll want to search for Multi-valued Parameters. If you open the properties of the parameter there will be an option something like "Allow multiple values". Reporting services will handle the UI with checkboxes.
One important thing to know about multi-valued parameters is how to use them in your query. Suppose your parameter #CountryId is being filled with this query:
SELECT CountryId, -- This will be the value for the parameter
CountryName, -- The label for the parameter
FROM Country
If you set this parameter to allow multiple-values, reporting services will generate the multi-select UI for you. When executing any subsequent query that uses the parameter, before sending the query to your SQL server it will replace the parameter with a comma-seperated list of CountryId values. So this query:
SELECT *
FROM MyDataTable
WHERE MyDataTable.CountryId IN (#CountryID)
Will be sent to SQL server as something like this, supposing there are 3 countries selected:
SELECT *
FROM MyDataTable
WHERE MyDataTable.CountryId IN (1001,1002,1003)

Date Ranges in jqGrid Searches

We are using advanced search in the latest version of jqGrid, and our search dialog is configured to be always visible on the page above the grid. The structure of our data lists is dynamic. Thus, when we are going to display a list, we first do an ajax call to get the list of columns for the grid. We then construct the data model for the grid and make a request for the data.
Currently, in the request to get the columns, we return the data type of the column. If the data is a date, we display a date picker in the search form. However, some of our customers HATE having to use <= >= for date ranges. They want to be able to pick a date column and then set a start and end date using two side-by-side date pickers. I've been pushing them off for a while now because they have the ability to do date range searches, but the complaining isn't stopping. (It's more clicks to add the second filter with the end date)
Is there any way I can modify jqGrid to give me a date range control when I am configuring a search on a date column? I really don't want to have to set up an external search dialog UI just to deal with these complaints, but product-management is pushing really hard to get "normal" date ranges for the grids.
You can create your own custom search dialog. See this question which I asked couple days ago.
using setGridParam to change your postData array and include extra values in the filters JSON object that will be carried over to your server side where you can dissect it. In your case you can pass over your data range Start and End inside the filter item of the postData. Then reload your jqGrid like this
var $grid = $("#list');
//$grid.setGridParam({datatype:'json', page:1}).trigger('reloadGrid');
var post_data = {searchField:'',searchString:'', searchOper:'',
filters:'{"groupOp":"OR","rules":['+
'{"field":"Date","op":"ge","data":"2012-04-23"},'+
'{"field":"Date","op":"lt","data":"2012-04-25"}' +
']}'
};
$grid.setGridParam({postData:post_data}).trigger('reloadGrid');
The above will save the postData array with the new config and the reloadGrid sends a request to the server with the new postData array. This will preserve the paging as well; however, to get the old view of your grid (without search terms) you need to implement the reset button separately too and trigger reloadGrid after that for this to take effect.
Not sure if you have solved your problem by now; however, I am putting this solution here for any one from the future who has the same issue.
As far I know there is no way to do this, but to write it yourself.
http://www.trirand.com/jqgridwiki/doku.php?id=wiki:custom_searching
Filter jqGrid Data by Date Range?

Resources