s
menu
menu

Login  |  Register search:   
Enterprise Forms Forums
 
  Forums  Discussions  General  Newb Question - How to insert Data and General Questions
Previous Previous
 
Next Next
New Post 8/19/2008 2:44 PM
User is offline Jeff Booth
6 posts
No Ranking


Newb Question - How to insert Data and General Questions 

Just recently installed EF, so bare with me if these are easy questions to solve.  I have built a real general maintenance form to start, with 3 fields databound to a Non-DNN table.  The table itself has an Incremental ID on insert of a new rowset.  The only field that is enterable is a desccription field the others are readonly with default values.  I also have a grid at the bottom to display the current data in that table for edit or delete and for subsequent entries to show up on insert.  I have created all the necessary items I believe within the template manager since it validates just fine.


My questions are:

  • When the form displays it shows the first record from my table in the desccription field (this table was already populated).  How do I make that blank? Obviously this is because it is databound, but this is an entry screen so I don't want any data visible.
  • I can't seem to enter any data into the database.  When I enter data into the desccription field and click submit on the form the page will refresh but nothing seems to happen, no data gets entered.  Did I miss a step along the way for inserting.  SQL sccript or something.  I can't seem to find any thing to the like.
  • Based on the grid, how do I make those records linkable to go to a detail screen for either deletion or edit. 

Any help would be greatly appreciated to increase the learning curve.

 
New Post 8/19/2008 11:27 PM
User is offline EThuongmai Support
2796 posts
1st Level Poster


Re: Newb Question - How to insert Data and General Questions 

The way you would normally go about this is to utilize a query parameter, say "tblid" to distinguish between add and update mode.

Using the form you already have if the query string parameter "tblid" is empty then you are in add mode.  Thus when user clicks on the Submit action button you add a new record to the your table, assuming you are already using the Execute SQL workflow task.  And if the querystring paramter "tblid" is non-empty you load the data from your table using a stored procedure and bind to the fields.  Whether the "tblid" is empty or not, you will still need to pass the querystring param to the stored procedure in the form of token.  Assuming the load stored procedure is called "myLoadSP", you'd call this as myLoadSP [QUERY:tblid]

As for the datagrid that displays all the records in your table, you simply add  new column that provides a link to the same form with the querystring "tblid" embedded.

Hope that helps

 

 


Enterprise Forms System Admin
 
New Post 8/20/2008 12:24 AM
User is offline Jeff Booth
6 posts
No Ranking


Re: Newb Question - How to insert Data and General Questions 

Thanks for the response.   I understand the datagrid piece.  All your doing is just linking to the unique ID as the parameter for the query to pull back that unique record.  I am still a little foggy on the first piece though. 

Am I going to have two query's (Stored procs).  One as a select statement with a "tblid" parameter defined in each field properties of the form that is databound to my table, this will be used for either adding or modifying mode (also coming from the grid).  the other will be an insert or update statement set up in the workflow area under the Execute SQL workflow task based on the same "tblid" and conditions.  

I apologize for the confusion.  I think once I see how this all fits together I will be in a much better place.

 
New Post 8/20/2008 12:50 AM
User is offline EThuongmai Support
2796 posts
1st Level Poster


Re: Newb Question - How to insert Data and General Questions 

Essentially you will need 2 SP, one for loading data and one for add/update of data

Assuming the SP for loading data is called "LoadDataSP" with one input param "varchar(10) tblid" the sp content would look

-----------------

IF @tblid IS NULL OR @tblid = ''

SELECT dummy data and return

ELSE

SELECT record based on @tblid

--------------

 

I guess the same technique is used for the add/update SP

 


Enterprise Forms System Admin
 
New Post 8/21/2008 11:57 PM
User is offline Jeff Booth
6 posts
No Ranking


Re: Newb Question - How to insert Data and General Questions 

Again thanks for the help, its startng to come together.  The SQL parts I don't have any issues with, just how things fit together.  I have gotten my insert to work so I'm getting a better understaning now. 

I am still confused with the Databinding on the form load to the SP.  Does the load data SP have to be entered for each field that is bound, or is there an area that I am missing that you define your SP and then bind your fields to that data.  Or do I need to add in another workflow.  I am sorry for the confusion

Also after insert how do you make the screen refresh so that user has the ability to enter another submission?

 
Previous Previous
 
Next Next
  Forums  Discussions  General  Newb Question - How to insert Data and General Questions
What's New

Version 04.02.02

  • New Feature - Data Archival:  the ability to archive form data for import and export between environments
  • New Feature - Field Element Tooltip: ability to assign a tooltip to a individual form field elements
  • Enhancements - Form Layout Designer:  added compatibility support for new default skin in DNN 4.9 or later
  • Enhancements - Look & Feel: modified the general look & feel to be inline with DNN standards
  • Bug fix: fixed issue with download attachments for anonymous user.

 

Version 04.01.08

Form Template Manager

  • External Database Connections:  provide support to external databases 
    • Microsoft SQL Server - Microsoft SQL Server 2000/2005
    • Microsoft Access - Microsoft Access Database
    • MySQL - MySQL Database version 4 or later
    • Oracle - Oracle Database 9g or later
    • PostgreSQL - PostgreSQL 7.4 or later
    • VistaDB - VistaDB Database
  • External Database Connection Security - Security to external connections can be controlled at the form template level
  • Database Query Tokens - added the ability to associate custom Dynamic Tokens to Database Query using current or external database connections.
  • Conditional Boolean Expression - the ability to use conditional expressions where conditional evaluation is available (i.e conditional databind, visibility, advanced workflow processing)
  • Execute SQL Workflow Task - added the ability to also execute SQL commands to external database connections
  • Template Upgrade - added the ability to upgrade exsiting form template layout through form template import
  • Button Field Element - added support for Button field element

 

Version 04.00.16

Form Template Manager

  • Workflow Processing Tasks 
    • Paypal payment processing - enabling the ability to integrate payment processing with Paypal via IPN
    • Text/HTML Module Update - enabling approval workflow for adding/editing content for Text/HTML module
    • Announcement Module Update - enabling approval workflow for adding new announcements for Announcements module
    • Change Owner - enabling the ability to change the form owner to another portal user
    • Form Data Post - enabling the ability to post form data (or subset of) to a specified URL
    • Add/Remove portal roles - ability to add or remove portal roles to/from the user
    • Email notification - ability to send separate email notifications to different groups of users
    • Execute SQL - ability to execute raw SQL statements or compile stored procedures
    • Register/Edit Users - ability to register new users or edit an existing user
  • Conditional Workflow Processing - added the ability to evaluate an conditional expression using form values or other meta-data before executing a workflow tasks
  • Multiple Workflow Tasks - added the ability to execute multiple workflow processing tasks per form submissions or workflow state change with transactional support. 
  • Enable/Disable Workflow Processing Tasks - the ability to enable or disable individual Workflow Processing Tasks on a per portal basis. 
  • Enable/Disable Raw SQL - added the ability to enable or disable raw SQL support where applicable in areas such as data binding or workflow processing tasks.  Raw SQL are direct SQL statements
  • Instant Template Approval - added the ability for a single-click form template approval or editing
  • Caching Area - added the ability to select the caching area for temporary session objects.
  • User Interface - re-organized the user interface to improve usability where applicable

Data Collection Manager

  • Full Workflow Management - added the ability to manage the full workflow life cycle rather than just the initial workflow state

Workflow Manager

  • Enable/Disable Workflow State Detail - added the ability to enable or disable the visibility of Workflow State Info when viewing form in detail
  • Enable/Disable Workflow History - added the ability to enable or disable the visibility of Workflow History info when viewing form in detail

Report Manager

  • Enable/Disable Workflow State Detail - added the ability to enable or disable the visibility of Workflow State Info when viewing form in detail
  • Customize Detail View Template - added the ability to customize the detail view when viewing form in full details
  • Enable/Disable Workflow State Detail - added the ability to enable or disable the visibility of Workflow State Info when viewing form in detail
  • Enable/Disable Workflow History - added the ability to enable or disable the visibility of Workflow History info when viewing form in detail
  • Personalized Search - added the ability to remember search query (per user)

Click here to view the full change log

footer
Update :: November 20, 2008