11-17-2011 05:30 PM
Is it possible to create a fetch mapping that populates a selection list with different values for the display value and the key value? You can do this in Service Designer for predefined SQL queries.
I need to perform a dynamic query that populates a selection list with display values users will understand, but whose underlying values are really unique identifiers.
In the end I'm trying to build a hierarchical series of selections where the value of the most recent selection becomes a parameter to the next query.
I could probably perform the fetch and then manually iterate over the result set in javascript, adding the values to the selection list, but I'm wondering if there is an easier way.
I'd like to be able to do something like the following, but I don't think its possible.
<map name="M1">
<entry Field="BETA_ID_NEW.DepartmentBranch.Name" Column="DisplayName"/>
<entry Field="BETA_ID_NEW.DepartmentBranch.Value" Column="Value"/>
</map>
11-17-2011 05:30 PM
Unfortunately, you are correct, there is no way to do this except by hitting it over the head. But your proposed solution is interesting -- if it worked at all, I suspect fetch would populate two drop-down/select lists, rather than 1. (I've tried this, but actually doing two fetches -- very wasteful.) But then, you wouldn't have to iterate through the entire list, just set the selected index for the second (value) list, not writeable by the user (hidden?), to the index just selected by the user for the f
11-17-2011 05:30 PM
Hi Taylor,
Here's a thought which may work, what if you created a matching hidden dictionary which would have the the values you wanted. Then when the user selects from the list of display values the customer understands from the visible dictionary you are populating, you have the hidden dictionary (via ISF) select the actual value you want which matches the selection chosen by the customer. This way you have the values stored in the database via this hidden dictionary.
Hope this
11-17-2011 05:30 PM
Here is the solution I came up with to work around this issue.
The fetch data callback returns an array that is created with code that looks like the following. You can view it by turning on isfDebug=true and viewing the source of the popup fetch page showing query results. Note you can also access the row count and the parameter list passed into the query.
var retArray = new Array();
retArray['Q2005._COUNT_'] = 1;
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide