Web control (e.g. dropdown list, textbox) or URL as input parameter?
How can I pass parameters to the BDC?
E.g. Assume that I have a dropdown list with different names (name1,..., name10) and I want to group my result by nameX.
SELECT * FROM myTable GROUP BY @nameX
My question is not limited to the GROUP BY expression it should work for every SQL statement parameter or even to a stored procedure parameter. How can I pass a parameter to a stored procedure?
Or assume we have to URL:
http://www.domain.com/moss/default.aspx?myFirstparameter=SomeFieldName&mySecondParameter=10
and
SELECT @SomeFieldName FROM myTable
I know how parameters are handled in a search (FilterDescriptor) but my scenario is quite different.
[935 byte] By [
Erulu] at [2008-2-26]
Your scenario is not as different as it may seem. You are still conducting a search, whether it be with a specificfinder, or some other method.
Look at the default action page that is created for your entity, it does exactly what you are trying to do.
There is an out of the box web part, called the "Business Data Item Builder", which takes parameters from the query string and looks up the Business Data Item. Combining this web part with other business data web parts via web part connections allows you to view a business item based on the query string.
I think it's different because: In my case I want to add a dropdown list in the BDC web part (this could be done in the XSL config file?) like the "is equal to"/"contains"/... dropdown list and pass the value of this selection as a parameter to the BDC.
E.g. the dropdown list for the above mentioned list is:
<select name="ctl00$m$g_763a8d64_eb58_46c2_821d_94c5d8d9d28f$BdwpOperatorName0" id="ctl00_m_g_763a8d64_eb58_46c2_821d_94c5d8d9d28f_BdwpOperatorName0" title="Operator">
<option value="0">is equal to</option>
<option value="1">starts with</option>
<option value="3">ends with</option>
<option value="2">contains</option>
I didn't find wether the name nor the id parameter in the XSL file and I have absolutely no idea how the option value is passed as a parameter to the BDC.
I'm not so used to XSL so it's not so easy to see how this technique works without any background information. I search the MSDN, googled,... but unfortunately with no result.