Several customers have had some issues with Dynamic Views recently depending on your specific version of Dynamic Views and implementation type (table, VS Dynamic Forms, etc...)
Below are a few of the most common situations and some of the best ways to solve the problems.
Occurrence #1
Issue: When selecting Dynamic Forms as a data source type, no Dynamic Forms instances appear.
Explanation: This is caused by certain DNN versions because the module title that is used is pulled in from a different table then versions of DNN prior to 5.2.3.
Solution: If this is happening please
run this query under Host/SQL.
Occurrence #2
Issue: When selecting Dynamic Forms as a data source type, whenever saving the module instance the setting is not getting saved properly and its always reverting to the first/initial Dynamic Forms instance.
Explanation: This is a known bug in an earlier version of the initial 2.0 release.
Solution: If this is happening please contact support or check the patches and hot fixes for the updated 2.0 release.
Occurrence #3
Issue: When selecting / clicking 'Generate Columns' for a specific Dynamic Forms instance, no columns get generated.
Explanation: This is a common problem on very large forms. When you use the Dynamic Forms data source, what is really happening is that the stored procedures are generating a column within a temporary table for each and every question label within your form. So, this can create a problem in some situations if you 1. have the same question label multiple times in you form. 2. have question / question labels that
include invalid characters etc... Basically, if you would not be able to go into SQL Server and create a new table with each column named the same as a question label within your Dynamic Forms instance, the queries we use to do this also will fail.
How do you know if this is your situation? The best way to test and see if this is what is happening within your implementation is to create a sample Dynamic Forms instance with only a couple of fields (all with unique question names) and see if this form instance can generate columns. If this form instance can generate columns correctly but others cannot then the reason is likely because of some specific field(s) and their labels on those form instances.
Solution #1: Check your form instance that is causing problems. Do you see any questions that are repeated with the same exact question label? Do you see any questions that appear to have invalid
character’s in them if you were to try and create a column with that same name? If these are easy fixes then simply change/modify these questions accordingly.
Solution #2: You can modify the query that Dynamic Views uses(both the 2.0 and 2.1 release) to utilize collecting Dynamic Forms fields based on the short field name for each column instead of based
on the question label. This query also checks and only displays questions that don't have more than 1 field with the same short field name (because repeating fields are not allowed, just the same as you could not create two columns with the same name in a SQL Server table).
You can download and execute this query here... After you have executed the query you should go to host, host settings, and click restart application.
Note: this will affect previous view instances so you should consider this when making the change.
Occurrence #4
Issue: When using an external connection, even selecting a basic table or simple query is not returning any results.
Solution #1: When using an external connection, and NOT using the 'free form' option, you will need to create the stored procedure that the module uses to filter results, search results, and limit the number of records returned. This query can be
downloaded here, you will need to run and execute the query on the external server. We have removed the database owner and object qualifier parameters because if you are using an external server its likely they are not using these. We also removed the option to integrate with Dynamic Forms because we are assuming that since you are using an external connection you will not need that portion.
Solution #2: Use the free form option... When do I use the 'SQL Query Free Form Option'? How do I use the free form option?
The free form option was added within the 2.0 release to support queries against external database connections that are (primarily) NOT using SQL Server.
Why? The built in features for selecting only a certain number of records, adding filters / search criteria are handled via database calls and not within the VB.NET code. So, when you do not select to use the Free Form option you need to make sure you create the stored procedure (mentioned in Occurrence #3). If you are ARE using the free form option you need to keep in mind that things such as filtering the data, limiting the top records, and also your search criteria will not be used within the built in functionality.
Please refer to the user guide for full instructions on how to use search criteria for the free form query option. The basics are - use $(SearchFieldName) within the SQL Query / stored procedure
to reference the search field value, and use $(SearchFieldName_Condition) to use the condition. So if a user entered 'John' for the search field FirstName and the user selected Begins With as the condition
then the token $(FirstName) would render 'John' within the query and token $(FirstName_Condition) would render 'Begins With'. You could then use the condition string to limit/change your query.
Note: Enable Debug Mode to see the exact SQL query you are sending to your external connection
Tip: Only the 'Free form option' will allow support against a external connection that is not SQL Server.
I would love to hear any comments, suggestions, or issues you run into... I just wanted to compile this list as I thought it would be very helpful!
Thanks,
Chad