.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

BDC Models - Pass parameters to ReadList() method?

Posted By:      Posted Date: October 05, 2010    Points: 0   Category :SharePoint

Hi Guys,

I have some BDC models built and they work great within Sharepoint. I have one list, for example, which lists all Institutions listed in the DB.
On the following page (Everything you need to know about BDC) they show a customers list with search options at the top of it. Is it possible to get that working in Visual Studio? I've tried using filters, but it appears as those values are hard-coded from the List Settings page.
Any thoughts on how to achieve something similar?

Next challenge is to figure out how to get one-to-many relations ships working for reading data, and then for writing data (an institution can have multiple addresses, for example). But that's for another day :)


I wrote a book :) http://www.amazon.com/Microsoft-Visual-Studio-2008-Programming/dp/0071604081

View Complete Post

More Related Resource Links

How to pass parameters from Application Main method to modules.

Hi , We created Prism WPF application.we have to pass some parameters(some information) to modules(they are instantiated by Bootstrapper) from Main method of App.xaml  Thanks in Advance.

How can i pass parameters to DomainService method



I users VS2010,DD4,WCF RIA Serivce.

I have a table Exchange(column: ID, Name, Date, Price) in db, i need to GroupBy Name then Sum(Price),

the method in  DomainServiceClass

public IQueryable<Exchange> GetExchange() {

return this.ObjectContext.V_ExchangeAll.GroupBy(v => v.ProductName, (pname, v) => new {

ID = v.FirstOrDefault().ID,

Date = v.FirstOrDefault().Date,

Name = pname

Price = v.Sum(vv => vv.Price)

}).ToList().Select(v => new TCMS.Service.Exchange {

ID = v.ID,

Date = v.Date,

Name = v.Name,

Price = v.Price,

}).OrderBy(v => v.Name).AsQueryable();


The problem is that the query is execute first because of Tolist(), but i need filte Date field before it. So i have to save date in Cache, is there any other way to use date directly?

There is another problem: Can i get the result of Sum(Price) after filted date, and before filte in page(.Skip(0).Take(20))?

How to pass parameters to MDX through URL?


I have an SSRS report. I created it using BIDS and it uses a Sql Server Analysis Service data source.  The data source query is an MDX query with one parameter: @region, a default value has been set for this parameter.  The value which @region takes looks like [USA].[Northeast].[New Hampshire].[Coos County].

The MDX query goes like this:

Select ....


WHERE StrToMember(@region)

This report runs properly inside BIDS or through web browser after deployment.  In my report manager at http://localhost/Reports, I am able to view this report by selecting the value for the @region parameter from a dropdownlist, which contains such values as

Coos County
Cheshire County
Sullivan County
Strafford County
... ...

I know that we can pass query parameters to SSRS through the URL. I have successfully done so with relational database which uses regular SQL. But, I have not succeeded in passing this @region parameter of my MDX query through the URL.

I tried the following:


It didn'

Problem with Finder method with parameters



Could someone explain me how to provide some value to the parameters in a finder method. For exemple I know that the BDC list WP use this method. Is there a way to provide some value for those parameter at runtime? I really don't understand (even after some deep search on the web) where are the values for the parameters from and how we can connect to them. Even with C# code I can't find any information on how it work.

I don't want to define my parameters as filter in the ADF because then I will have this filter section in my BDC list WP (or is there a way to get rid of that?). Actually one of the parameter should be automatically calculated from a value in a SP list, the other parameter should be provided by my own filter web part.

Thank you for your help.

Need to pass parameters from URL to fields in Custom List


I have a complex customized list and I need to pass parameters of two fields so that when the 'Questionnaire' is completed and subsequentially opened after initial submission, it will retrieve the Number and GUID automatically in respective fields. I send an email out with a link to the 'Form' that carries the parameters. I am trying to use the following javaScript but am unsure as to where to place this on the SharePoint page for it to work.



<script type="text/javascript">

function loadFormVars()
getQuerystring('CustodianGUID', 'ctl00_m_g_d08916d8_7224_4665_be72_2de381f45985_ff46_1'); ///replace
customerGUID and form field name
'ctl00_m_g_d08916d8_7224_4665_be72_2de381f45985_FormField11_ctl00_ctl00_TextField'); ///replace customerGUID
and form field name

alert("it works");

function getQuerystring(key, field)
key = key.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regex = new RegExp("[\\?&]"+key+"=([^&#]*)");
var qs = regex.exec(window.location.href);
document.getElementById(field).value = qs[1];


How to Pass higher Length of Byte Array to the remoting method

Dear all,I am using a windows application and the businness logic is present in the remote server.Once particular method takes bytearray as input parameter...Whenever the method call is made the function returns value .This is limited for the particular bytearray length. (4109228 bytes).If the length of bytearray crosses 4109228 bytes.I am getting an error that "input stream is not valid binary format".How to Pass higher Length of Byte Array to the remoting method... Greater than 4 MB?I believe something is missing in web.config or app.config...?What could be the issue...? Any sugesstions are welcome....ThanksRavikumar

Capture and pass "abc\xyz" as a string into my WCF method

Hi All, I am trying to implement WCF Method where client has to pass like "abc\xyz" as a string i have to capture it and pass to my method. I am not able to do it. In our application we can split the string  and we can do what ever we can do . but string comes from client site so who do i capture into my method. I am very much new in WCF. Could u please help me. Thanks Shekhar  

Link to .xls but need to pass parameters

 Hi All, I have a page containing a link to to MS Excel spreadsheet (I am able to assume that Excel is available as this is an intranet page). All works fine until I want to pass a parameter into the spreadsheet. Normally I would do this with /e but this will not work I am starting Excel through a link. Any ideas how I would pass the parameters into Excel? (also - there may be multiple requests for the spreadsheet at any time with differing parameters!!)   Thanks

Form Action Button to pass parameters through URL and how to fill a NewForm with them

Hi I'm trying to solve a bigger problem we have in babysteps, and I guess after days of searching and trying I simply need to ask for help. The big picture is, that we're trying to put a Form Action Button (via Sharepoint Designer 2007) above a custom DataForm DispForm.aspx which is supposed to navigate to a NewForm.aspx where the Title Field is supposed to be prefilled with a parameter from the DispForm and the user should be able to add information to the item before it is saved. I found several explanations from people on the internet, but nothing really worked. The first babystep would be to get the parameter through the button into the url of the new item.   < input type = "button" value = "Zugriff Beantragen" name = "btnFormAction0" onclick = "javascript: {ddwrt:GenFireServerEvent('__redirect={../Zugriff Beantragen 2/NewForm2.aspx?test={ItemID}')}" />   That's the code for my button. Somebody wrote that should definitely work because SharePoint is able to replace {ItemID} with the actual ID of the item. Well.... it kind of doesn't. What I get as the end of the new URL is exactly "...?test={ItemID}"   I tried with different names for the ID, I added an @ before those ... no change. I read somewhere about javascript.functionName() which should work with all parameters of the item, but

can a Workflow access a stored procedure and pass the parameters from the list data to the stored pr

The reason that I would like to consider this functionailty is because my table architecture is complicated and I do not want to modify my master table to accept all of this data where some of the data should be normalized into sub tables.  Has anyone see evidence of the stored-procedure parm approach?  Is this best accomplished through VS 2010 or can I do it through SPD? Thanks

How to pass page column value to data view parameters

Hi All, I have a page library with custom column, lets call it "FormCourseId". On that page I have data view which retrieves data from custom list filtered by page column "FormCourseId". In parameter wizard creates the following tag <ParameterBinding Name="ListCourseId" Location="Form(FormCourseId)" DefaultValue=""/> Then I try to use that parameter in XSLT of data view as a filter creteria.  <xsl:param name="CourseId"></xsl:param> It does not work for me. If I change data view parameter source from Form to Query String and pass parameter as url one it works fine. What is wrong with page column parameter binding? May be if FormCourseId column is not presented in form layout as a field(I do not need to show that field in user form of the page) it could not be treated as form parameter?

Passing Parameters to Web Service Method using XML DataSource

I would like to know how to pass parameter values to a web service that I am using as a data source.  I am using the Data Source Type XML.  I have been able to retrieve data back from the web service method that does not require parameters.  But I need to be able to use a web service that requires parameter values.  How do you use the XML data source type with parameters?  I have use information from the article  http://www.codeproject.com/KB/reporting-services/SSRS2005XML.aspx. thanks, Lloyd

Using Wizard To Pass Parameters From Page With No Buttons?

I'll start out by saying that I am kind of new to the Wizard control.  What drew me to it, was the fact I didn't need to pass variables between pages with the traditional methods.  Now I am faced with a situation where I may have to use those methods.On Step 2, I have a handful of LinkButtons that look similar to this... <asp:LinkButton ID="LinkButton113" CssClass="ListingItem" OnClick="boxChanger" runat="server" Text="Tree Services">Tree Services</asp:LinkButton> The sub boxChanger is this... Sub boxChanger(ByVal sender As Object, ByVal e As System.EventArgs) Dim s As LinkButton = CType(sender, LinkButton) Dim hd1 As HiddenField hd1 = CType(TemplatedWizardStep2.ContentTemplateContainer.FindControl("hdLinkItem"), HiddenField) hd1.Value = s.Text Wizard1.ActiveStepIndex = 2 End Sub I figured I could hide the item in a hidden field control before transfering over to the next page by changing the activestepindex.  That's not the case.  The first trip through the steps, I never retrieve the value in Step 3 from the hiddenfield.  However, if I called boxChanger to get to Step 3, use the previous button (buttons are visible on Step 3) to change index back to Step 2, then c

How to pass two parameters

This works great for 1 parameter SqlDataSource1.SelectParameters("City").DefaultValue = Me.Page.Title But I can't figure out how to pass in two parameters in a single statement (See the Select Parameters Below) Two paremeters (City, and Classification) If i set the page title to say "Bismark Charters" Bismark = City & Charters = Classification <SelectParameters> <asp:ControlParameter ControlID="CharterGridView" DefaultValue="" Name="Classification" PropertyName="SelectedValue" Type="String" /> <asp:ControlParameter ControlID="CharterGridView" DefaultValue="" Name="City" PropertyName="SelectedValue" Type="String" /> </SelectParameters>The parent page title is used to populate the "City" Defaultvalue I tried using a new page element: Description="" to populate the "Classification" DefaultValue but Descriptipon is not a member of the page element eventhough it will not cause a runtime error.Anyone have any Ideas how to do this?               </SelectParameters >

How to pass multi-value parameters to DDS (data driven subscription)?

Using RS2005, how should multivalue parameters be stored in a database field so that a data driven subscription can properly read and use them?  I have so far had no luck using syntax of: 1)  parm1, parm2 2)  parm1,parm2 Do single qutoes need to explicitly wrap the values?  Can you please provide an example and a SQL INSERT statement using parm1 and parm2 to demonstrate what to store in the database field?  Thanks!!

How to pass parameters via a button control

Hi all, I would like to pass a number of parameters via a button, (it must be a button) but I don't know how to do this, could someone please help. I've be grateful for any suggestions    

how do I pass parameters to the linqdatasource selecting event handler? can I pass an IQueryable?



I'm having an issue coming up with an appropriate code design to implement a search page using linq to sql for my DDL. I think the best way for me to explain where I'm at is describing what I've done in the past, before linq. Lets say we have a basic search page with various user input controls for search options... for simplicity, let's say there are two main ways the user can search. 1. a dropdown filled with account numbers. When that drop down is changed and an account number is selected, a gridview needs to be populated with all the records for that account. 2. the second way is a dropdown for choosing what field you want to search, a textbox for entering what you want to search for, and a button to execute that search. In the past, just using straight ado.net I would handle each of these two search options separately within the events of the dropdown list and the button, respectively. In selectedIndexChanged for 1, and in the buttonClick event for 2, I would construct my sqlCommand etc, ultimately returning a dataset or datatable which I would then bind to the gridview. The logic was separated by the two different event handlers. Now, fast forward to linq to sql and I have a similar page layout, but I am using the linqdatasource selecting event to build my where conditions... now the difference is *everything*, all the logic, is now in this

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend