Latest developer linksBookmark and Share
 
HomeThis WeekTop MonthTop AlltimeSearchRegisterFAQ
  
 
Submit Your Link
Please login to submit your Link
 

Display "Created" and "Created By" in InfoPath Form View

Posted: Jan/18/2011   By: nikhil   Points:15   Category: .NET  - ASP.Net    Views:17   Vote Up (0)   Vote Down (0)    
I have created a form using InfoPath and published it to a form library on my MOSS 2007 server.  This form has 2 views - the default view is for users completing the form, and a second view that administrators can view to see the form plus some additional information I'd like to add to the bottom.

This additional information is metadata about the form itself, specifically the "Created By" and "Created" values from the form library.  So, when the second view is displayed, the administrators should see the form as well as the name of the person that submitted the form and when it was submitted.

I have found some information online about using a query data source to do this but I have had no luck.  I have created the data source to point the form library, to include data for the active form only, and to automatically retrieve data when the form is open.  I then opened my second view and inserted both of the fields using the data source pane on the right of the screen.

So far this seems to be correct, however when I submit a form and then open it from the form library and view the second view, I do not see the additional fields for "Created By" and "Created' at all.  When I initialy inserted them into the form the application put them into a repeating section automatically, but I have also tried inserting them as non-repeating text boxes, and in that case even though I do see the fields there is nothing displayed in them.

I have also tried using a Rule and a Refresh button to refresh the query (secondary) data source, but the data is still not displayed.  I'm sure it must be something simple that I'm doing wrong but I cannot figure out what I'm doing differently than all the examples on the web.

Any help is greatly appreciated!
Thanks,
Chanda

View Complete Post


Comments:
Be the first to comment this post.
 
Post Comment
Please login to post your comment
More Related Resources

Display Confirm Message box on delete row in a gridview

  
you can use javascript confirm() dialog for asking user confirmation to delete records or not?

How do I get the datakey for a DataControlRowType.DataRow when a TemplateField is created in code behind?

  

Hi, i'm new to this and I've been stuck for a while on this one.
I would like to retreive the data key (au_id) when the rowType = DataRow, so I can do a Sub query with the datakey Id. 

thank you for your help.

 

I'm using this Microsoft Example:

<%@ Page language="C#" %> <script runat="server">
 
  // Create a template class to represent a dynamic template column.
  public class GridViewTemplate : ITemplate
  {
    private DataControlRowType templateType;
    private string columnName;
  
    public GridViewTemplate(DataControlRowType type, string colname)
    {
      templateType = type;
      columnName = colname;
    }

    public void InstantiateIn(System.Web.UI.Control container)
    {
      // Create the content for the different row types.
      switch(templateType)
      {
        case DataControlRowType.Header:
          // Create the controls to put in the header
          // section and set their properties.
          Literal lc = new Literal();
          lc.Text = "<B>" + columnName + "</B>";
         
          // Add the controls to the Controls collection
          // of the container.
          container.Controls.Add(lc);
          break;
        case DataControlRowType.DataRow:

 

         //  GET au_id DataKey Here

 


          // Create the controls to put in a data row
          // section and set their properties.
          Label firstName = new Label();
          Label lastName = new Label();
         
          Literal spacer = new Literal();
          spacer.Text = " ";
         
          // To support data binding, register the event-handling methods
          // to perform the data binding. Each control needs its own event
          // handler.
          firstName.DataBinding += new EventHandler(this.FirstName_DataBinding);
          lastName.DataBinding += new EventHandler(this.LastName_DataBinding);
         
 &nb

send alert message to user if close internet browser before save web form data

  

 Hi, I have window form to let user fill data, I want to alert user if close web browser before saved web form data, could anyone provide any clue?

 

Thanks,

Martin


How to display dynamic XML data inside a Panel control?

  

Hi all,

I have a SQL routine which builds me an entire XML file and returns it as a string. 
If I save the content of this file as sample.xml for instance, I am able to open it in IE or any other browser and the user can expand the nodes and see all the content he wishes.

I am trying to build a ASP.Net page which will display the content of a XML file in the same way (or similar) that the browsers do.

So far, I've been reading some posts and noticed I can use XmlDataSource control and its Data property to load the entire XML doc as a string. Now I am stuck how to display the contents. I found TreeView very confusing and not sure if DataGrid would be a alternative as well. I need to user to be able to open and expand the nodes.

Please someone point me to the right direction. What controls to use, etc... sample codes are the best ;-)

Thank you

 


grid view without any data source date sorting problem

  

i grid view contain the following coloum

id    name         DateofBirth                  DateofJoining 

1       a            22-Aug-1980                      10-jan-2000

1       a            22-may-1980                      20-feb-2000

1       a            12-Feb-1980                      15-mar-2000

1       a            3-Aug-1980                      7-jan-2000

how to sort if we click   DateofBirth or Dateofjoining and not sort any where if we click(Id,Name)


Display directory files in descending order

  

I need to retrieve and display directory files in descending order. For example: file-02_01_2010.txt should display before file-01_01_2010. I am using DirectoryInfo.getfile(searchPattern) but that will return files in random order (or maybe ascending order, I am not sure). Is there a way to specify the order in which I need files to be returned? I know I can load them into an array, sort them, etc., etc., but is there any cleaner way?


access to web form from class

  

hey,

i've read several posts with similar but problems, but i can't find one exactly like what i am seeing.  This is probably very simple...i just can't get the exact solution.

Platform is c#, VS 2010.

I have a web form and code behind file, with scripting that works just fine.  i'm trying to move script from the code behind file into a class, to consolodate and create re-use. The basic problem is when i move the script into the class, i cannot access the webform.

error here on "this":   HyperLink hyplAlertbox = (HyperLink)this.frmEtsuHome.FindControl(codeboxID);

i know WHY it throws the error, i just don't know how to fix it.  any help is appreciated.

below is simplified code....

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

New Script in Code Behind File:


namespace myhome
{
    public partial class _default : System.Web.UI.Page
    {
                    
        protected void Page_Load(object sender, EventArgs e)
        {
             new majorAlerts();
             majorAlerts.GetAlerts();
             majorAlerts.ProcessAlerts(); } } }

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

Code for the Class

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


using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI.WebControls;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls.WebParts;

namespace myhome
{
    public class majorAlerts
    {
        
        public static void GetAlerts()
        {
            // grab the alerts and store them in a list                     
        }

public static void ParseAlerts(List<Alert> lAlerts) {
            foreach (Alert Alert in lAlerts) { // create codebox ID codeboxID = "codebox" + index.ToString(); // find hyperlink with ID of codeboxN cand reate an instance of it HyperLink hyplAlertbox = (HyperLink)this.frmMyHome.FindControl(codeboxID);

//******************* ERROR *************************************************
// ERROR ON this in previous line.  i understand, because "this" is not the form like it is in the code behind file.
// but i don't know how to modify "this" and make it work from class file
// **************************************************************************

 // set hyperlink URL value for alert based on alert ID alertURL = "http://www.blah.com"; hyplAlertbox.NavigateUrl = alertURL; } }




display data in row and column both

  

i have created university timetable.

how to display data.??

days show in row wise and period showin column wise

aur every period have particular course..

gridview..detalview or any thing..??

plz reply urgent....

give complete steps

 


"Tabbed" Form with strongly typed model and validation after each tab

  

I got a very long user creation form with tons of validation.  Works fine.

Now I want to "split" this form into 5, displaying each form in a set of tabs (will be using jQuery UI Tabs).

So when you start, Tab1 is enabled, the rest not.

You finish what is in Tab1, and click "Next", the part of the original long form get validated (like a normal form using client side and remote validation .....it *must* be client side.  User Requirement.)

If valid, Tab2 becomes enabled, and also the user are shown Tab2.

Once the user get to finish and reach the last tab (which will basically just have a "Submit" button) I need to post everything that was entered across the series of tabs to the server (back to the single form/model/controller the existing form works on).

Any tips / advice / samples out there will be welcome.  (However not suggestions to change the requirements....picky as hell client)

Thanks for reading....


"Generic" Nested View Model

  

Not sure I'm going to be able to explain this well enough, but let me try.

I'm going to have a fairly large view model, that's going to need a few nested types.  However I want to find a way making these nested types "generic".

Let's say I got a "ClientType" member.  There will also be a "ClientDetails" nested model, but the members (and validation) of the nested member will depend on what "ClientType" was selected.

On the front end, if you select "Individual Client", you get a partial rendered for you to fill in details required for a person (first, lastname, etc), but if you select "Company" as "ClientType", you get to fill out company details (co name, tax#, etc).

Does this make any sense?




 
Categories:
.NET
Java
PHP
C/C++/VC++
HTML/XML
SAP
MainFrames
Data Warehousing
Testing
MySQL
SQL Server
Oracle
Javascript/VB Script
Others
Login
 
 
 
 
 Forgot password
 Contact Us   Terms Of use   Share your knowledge