Need help with dynamic XPath Query for XmlDataSource In RCDC: Attribute_XXX doesnt seem to work
Hi, Whats the best way of dynamically querying a XMLDataSource to build the content of a drop down? Here is what I am trying to do: I have a drop down for Business Region. Based on the selection of the business region, I would like to have the list in a second drop down changed. The second drop down lists all the sites of a specific business region. To do so, the list of business regions and sites are organized as the following XML. Both the drop downs list the item source based on a XPath Query. Listing the first one is straight forward. However, not quite sure on how to automatically refresh the list of the second one based on the selection of the first. Here is the first drop down: <my:Control my:Name="BusinessRegion" my:TypeName="UocDropDownList" my:Caption="{Binding Source=schema, Path=divisionCode.DisplayName}" my:Description="{Binding Source=schema, Path=divisionCode.Description}" my:RightsLevel="{Binding Source=rights, Path=divisionCode}" my:AutoPostback="true"> <my:Properties> <my:Property my:Name="Required" my:Value="{Binding Source=schema, Path=divisionCode.Required}"/> <my:Property my:Name="ValuePath" my:Value="@Code"/> <my:Property my:Name="CaptionPath" my:Value="@Name"/> <my:Property my:Name="ItemSource" my:Value="{Binding Source=Business_Regions, Path=/Regions/BusinessRegion}"/> <my:Property my:Name="SelectedValue" my:Value="{Binding Source=object, Path=divisionCode, Mode=TwoWay}"/> </my:Properties> </my:Control> Here is the second drop down. <my:Control my:Name="BusinessSite" my:TypeName="UocDropDownList" my:Caption="{Binding Source=schema, Path=locationCode.DisplayName}" my:Description="{Binding Source=schema, Path=locationCode.Description}" my:RightsLevel="{Binding Source=rights, Path=locationCode}"> <my:Properties> <my:Property my:Name="Required" my:Value="{Binding Source=schema, Path=locationCode.Required}"/> <my:Property my:Name="ValuePath" my:Value="@Code"/> <my:Property my:Name="CaptionPath" my:Value="@Name"/> <my:Property my:Name="ItemSource" my:Value="{Binding Source=Business_Regions, Path=/Regions/BusinessRegion[@Code='%Attribute_divisionCode%']/BusinessSite}"/> <my:Property my:Name="SelectedValue" my:Value="{Binding Source=object, Path=locationCode, Mode=TwoWay}"/> </my:Properties> </my:Control> The second drop down works very well if I hard code the query as <my:Property my:Name="ItemSource" my:Value="{Binding Source=Business_Regions, Path=/Regions/BusinessRegion[@Code='FL']/BusinessSite}"/> Need some help in figuring out how to build a dynamic query. XMLDataSource: <my:XmlDataSource my:Name="Business_Regions"> <Regions> <BusinessRegion Code="" Name=""/> <BusinessRegion Code="CE" Name="Central"> <BusinessSite Code="CEN" Name="CEN"/> <BusinessSite Code="ABC" Name="Central-ABC"/> <BusinessSite Code="PQR" Name="Central-PQR"/> </BusinessRegion> <BusinessRegion Code="FL" Name="Florida"> <BusinessSite Code="XYZ" Name="Florida-XYZ"/> <BusinessSite Code="ALPHA" Name="Florida-Alpha"/> </BusinessRegion> </Regions> </my:XmlDataSource> Thanks & Regards, Jameel Syed Principal Consultant, fimGuru - Your window into simplified identities jameel.syed@fimguru.com - http://www.fimguru.com
December 31st, 2010 5:31pm

I don't believe what you are trying to do is presently supported by FIM, and certainly not without a (server side) post-back (i.e. to first submit a value for "divisionCode" which can then be used as context in a secondary lookup). The fact that it's not supported right now doesn't diminish the need for this sort of feature ... a classic scenario in any application form completion, for instance. The limitation is that "%Attribute_divisionCode%" will only ever return a value if it has previously been submitted ... check out http://technet.microsoft.com/en-us/library/ee534918(WS.10).aspx and you will see that the explanation of the above variable is "Returns a specified attribute, xxx, of the RCDC primary resource" ... the word "stored" (or similar) should probably preceed the word "attribute" to make this a little clearer. For this to work you would need to be able to somehow persist (at least temporarily) a value in the FIM database for the "primary resource", but FIM only lets you do this on the final submit. I'm afraid you'll need to re-think this to work within the framework FIM supports ... You may want to consider an alternative which I've used on a recent project ... whereby you use an identity picker for your second drop down list, and a collection of search scopes (one for each division) to allow the user to filter the BusinessSite list by divisionCode. You can tie all of these search scopes to the UocIdentityPicker by using a common UsageKeyword.Bob Bradley, www.unifysolutions.net (FIMBob?)
Free Windows Admin Tool Kit Click here and download it now
January 2nd, 2011 10:34am

I don't believe what you are trying to do is presently supported by FIM, and certainly not without a (server side) post-back (i.e. to first submit a value for "divisionCode" which can then be used as context in a secondary lookup). The fact that it's not supported right now doesn't diminish the need for this sort of feature ... a classic scenario in any application form completion, for instance. The limitation is that "%Attribute_divisionCode%" will only ever return a value if it has previously been submitted ... check out http://technet.microsoft.com/en-us/library/ee534918(WS.10).aspx and you will see that the explanation of the above variable is "Returns a specified attribute, xxx, of the RCDC primary resource" ... the word "stored" (or similar) should probably preceed the word "attribute" to make this a little clearer. For this to work you would need to be able to somehow persist (at least temporarily) a value in the FIM database for the "primary resource", but FIM only lets you do this on the final submit. I'm afraid you'll need to re-think this to work within the framework FIM supports ... You may want to consider an alternative which I've used on a recent project ... whereby you use an identity picker for your second drop down list, and a collection of search scopes (one for each division) to allow the user to filter the BusinessSite list by divisionCode. You can tie all of these search scopes to the UocIdentityPicker by using a common UsageKeyword.Bob Bradley, www.unifysolutions.net (FIMBob?)
January 2nd, 2011 10:34am

Bob, I am currently auto posting for diviisionCode. With autopost, I have verified that I can access the selection of the divisionCode dropdown by displaying the divisionCode in a textbox control. One thing I am not clear is the availability of %Attribute_XXX% in any XPath query or is it available only in queries with UniquenessValidationXPath? I have considered UocIdentityPicker before and will evaluate further if it meets my requirements. Its disappointing to discover such limitations on the RCDC. I hope MS is working on providing a better way to customize RCDC behavior.Thanks & Regards, Jameel Syed Principal Consultant, fimGuru - Your window into simplified identities jameel.syed@fimguru.com - http://www.fimguru.com
Free Windows Admin Tool Kit Click here and download it now
January 2nd, 2011 3:06pm

Bob, I am currently auto posting for diviisionCode. With autopost, I have verified that I can access the selection of the divisionCode dropdown by displaying the divisionCode in a textbox control. One thing I am not clear is the availability of %Attribute_XXX% in any XPath query or is it available only in queries with UniquenessValidationXPath? I have considered UocIdentityPicker before and will evaluate further if it meets my requirements. Its disappointing to discover such limitations on the RCDC. I hope MS is working on providing a better way to customize RCDC behavior.Thanks & Regards, Jameel Syed Principal Consultant, fimGuru - Your window into simplified identities jameel.syed@fimguru.com - http://www.fimguru.com
January 2nd, 2011 3:06pm

Bob, I am currently auto posting for diviisionCode. With autopost, I have verified that I can access the selection of the divisionCode dropdown by displaying the divisionCode in a textbox control. One thing I am not clear is the availability of %Attribute_XXX% in any XPath query or is it available only in queries with UniquenessValidationXPath? I have considered UocIdentityPicker before and will evaluate further if it meets my requirements. Its disappointing to discover such limitations on the RCDC. I hope MS is working on providing a better way to customize RCDC behavior.Thanks & Regards, Jameel Syed Principal Consultant, fimGuru - Your window into simplified identities jameel.syed@fimguru.com - http://www.fimguru.com
Free Windows Admin Tool Kit Click here and download it now
January 2nd, 2011 3:06pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics