schuhtl
river guide Posts:82
|
12-23-2008 05:40 AM |
|
I have created a test page on betasprings to show my non-working example here.
My goal is to pass the value from a Combo Box as a parameter to a hidden field that uses a sql query. Everything works when the page loads...the hidden field is populated however the hidden field value will not update when a user selects different values in the Como Box. I am sure a question event is required here but I can't get any of them to work right. |
|
|
|
|
Chad Nash Posts:5260
|
12-23-2008 06:57 AM |
|
I changed this a bit (not sure if needed yet) to pull in at the DSParam1 into a hidden field first, this is used in other implementations but not sure if its used in this one. Once you have this working you should change this query to be a stored procedure instead to minimize risk with the query and SQL Injection etc... You shouldn't need a question event, when you are you 'not' getting the value when you need it. For email or other events or what? Also, what is the value you are wanting? The value from the querystring? If so, then creating that hidden field and capturing it should be all you need. -Chad |
|
|
|
|
schuhtl
river guide Posts:82
|
12-23-2008 07:17 AM |
|
Chad, The value I want to get is the value returned from the following query: select UserRoleID as DefaultValue from UserRoles where roleid = '$(Roles)' and userid = $(DSParam1) I added the userid = $(DSParam1) parameter to the query above because I realized that my example could return more than one record....not the case in my "real" implementation. I got kind of lazy with my example but in my implementation I have a bunch of hidden user information that I want populated based on what is selected in the combo box. My problem is that my hidden information is populated one time with the "original" item selected in the combo box. If a user selects a different item...the hidden fields do not update. FYI...I am using a stored procedure in my implementation Thanks, Troy |
|
|
|
|
schuhtl
river guide Posts:82
|
01-01-2009 05:04 AM |
|
Chad,
I am still having problems with this and I have created a demo on BetaSprings here that is probably a little easier to follow than my first example. The form has two questions...one is dropdown list and the other is textbox but eventually I would need that to be a hidden field. All I want to do is pass the value of the select dropdown list item as a parameter to the query the textbox question uses. This works great one time...the proper value gets displayed in the textbox however if a user selects a different item in the dropdown list, the textbox value does not change. I am not sure if I need a question event for this or not but the only way I could find to populate the textbox at all was to hide it and then have a question event display it...
Troy |
|
|
|
|
schuhtl
river guide Posts:82
|
01-06-2009 03:45 AM |
|
Chad or Candace, Can you guys let me know if I am doing something wrong or if this is not possible in DF. Thanks, Troy |
|
|
|
|
Candace
river guide Posts:2431
|
01-07-2009 08:24 AM |
|
Hi Troy,
Have you tried using a question event to 'set question default based on another question's response?' I would first make the field visible then set it as a hidden field once the question event is working. Let me know if this helps, ok? Thanks.
Candace |
|
|
|
|
schuhtl
river guide Posts:82
|
01-07-2009 11:28 AM |
|
Candace,
The problem I encounter with creating a question event 'set question default based on another...' is that the default value is coming from a query...not a hard coded value. It is like there should be another question events option...like set question default based on a query or something like that. Maybe I am just doing something wrong but it seems like I have tried everything? Would you mind looking at my example to see if I have everything setup properly?
Thanks,
Troy |
|
|
|
|
Chad Nash Posts:5260
|
01-08-2009 07:29 AM |
|
Troy, Hi. Yes unfortunately this feature doesn't currently exist. There is the ability to use the SQL Default, but I am not sure this would work as it just initiates initially and not for question events. We will review adding an additional question event option to set the default value from a SQL query in future versions. -Chad |
|
|
|
|
schuhtl
river guide Posts:82
|
03-03-2009 01:13 PM |
|
Chad, Can you think of a work around for this? I REALLY need to find a solution. Thanks, Troy |
|
|
|
|
Chad Nash Posts:5260
|
03-03-2009 01:31 PM |
|
Troy, Hi. Thanks for your comments. Yes, we have it on the list for the next version to include the ability when using the question event to set a feature, to optionally allow you to set the value via a query. We had another user run into a similar implementation and they ended up making the form two pages to solve their issue instead of the question event (passing the value to page 2 and then using the SQL Default value). So, this is on the list for the next release and the only work around I would know would be this two page solution. If you needed something sooner then our release cycle we do offer Premium Support hours which you can pick up at http://www.datasprings.com/Premium-Support. This would get this bumped up before release, otherwise we are planning the Dynamic Forms 3.0 release May 1. - Chad |
|
|
|
|
Chad Nash Posts:5260
|
03-16-2009 07:34 PM |
|
Troy, Hi. Just an FYI that we are coding this and this will be part of the 3.0 Dynamic Forms release. When setting up the question event to set a default value there will be an option to use a SQL Default query. -Chad |
|
|
|
|
schuhtl
river guide Posts:82
|
03-17-2009 03:22 AM |
|
Chad, Thanks for the update! Thanks, Troy |
|
|
|
|