I need a form that automatically fills some fields and allows the user to input others... - InfoPath Dev
in

InfoPath Dev

I need a form that automatically fills some fields and allows the user to input others...

Last post 03-02-2015 07:35 AM by AndyMoon. 24 replies.
Page 1 of 2 (25 items) 1 2 Next >
Sort Posts: Previous Next
  • 01-30-2015 09:02 AM

    I need a form that automatically fills some fields and allows the user to input others...

    I have a SharePoint list that will contain information about the students in a particular program.  The form I am creating will allow them to fill in their demographic information, but before the student logs in, much of their information will be entered into the list by another user.  Currently, my form automatically fills the logged in user's ID in the appropriate field, I need to grab the "First Name" and "Last Name" fields from the list based on the user's login ID.  Then, I need to go ahead and grab any existing data from the list (as a rule, it will be blank), then write the filled data back to the list once the student has entered it.

    The form doesn't look the way I expect it to, all of the sections are repeating sections, which I didn't expect when creating the form.  In addition, I am not able to fill the first and last name, but the AD ID is populating fine with the GetUserByName service.

    I have plenty of experience with SharePoint, but very little with Infopath, I truly appreciate any direction you might be able to give me.

  • 02-06-2015 09:18 AM In reply to

    Re: I need a form that automatically fills some fields and allows the user to input others...

    Hi AndyMoon,

    To extract the first name or last name, you will need to add filters for the values, such as:

    Value[Name = "FirstName"] 

    Value[Name = "LastName"] 

    Please let me know if this helps. If not, kindly attach a sample of your form with an existing GetUserProfileByName data connection and I'll help configure the filters for you.

    Regards,

    Don Stephen Lambatin / Support Engineer
    Qdabra Software
  • 02-06-2015 09:46 AM In reply to

    Re: I need a form that automatically fills some fields and allows the user to input others...

     I don't want to extract the name from the AD identity.  I have the form populating the AD ID already with the GetUserProfileByName function.  Once this gets pulled, I need Infopath to grab data from a SharePoint list from the row where the "UserID" column matches the name I got from AD.

    Is that clear or do you need more detail?

    A

  • 02-06-2015 10:06 AM In reply to

    Re: I need a form that automatically fills some fields and allows the user to input others...

    Hi Andy,

    Thanks for the clarification. First you would need to have a data connection which queries the SharePoint list, and filter out the data based on the current user's ID. What we need here is to get the row ID in order to submit the data properly. Once you have the ID (for the specific row), you can use CAML (or other Submit to SharePoint List techniques) to update the row desired using the row ID. Note that you will need to use Cmd="Update" instead of New to update a list item. Or, if you wish for a codeless approach, you may want to check out qRule's SubmitToSharePointList command.

    Regards,

    Don Stephen Lambatin / Support Engineer
    Qdabra Software
  • 02-11-2015 12:17 PM In reply to

    Re: I need a form that automatically fills some fields and allows the user to input others...

     Don,

     I appreciate your answer, but it sadly went mostly over my head.

    I have a form, based on the SharePoint list in question.  I have created data sources to query both AD and SharePoint.  I'd like to populate the list with data from SharePoint based on the user who happens to be logged in at the time.  The missing piece for me appears to be the "filter out the data based on the current user's ID" part.  Can you go into more detail on this part, please?

     Andy 

  • 02-16-2015 11:39 AM In reply to

    Re: I need a form that automatically fills some fields and allows the user to input others...

    Hi Andy,

    Sorry if I wasn't clear enough. I assumed that the SharePoint list has a column which holds a list of UserIDs - which you can use to filter out your SharePoint list query. Can you attach a copy or a sample form so I can see how your form's logic is supposed to work? This way I can determine what isn't working for you and provide advices or options to take.

    Regards,

    Don Stephen Lambatin / Support Engineer
    Qdabra Software
  • 02-18-2015 09:04 AM In reply to

    Re: I need a form that automatically fills some fields and allows the user to input others...

    Don,

    I do have a column that holds UserIDs, it is the "ID-CougarNetID-Text" field.  I'd like the form to fill in all of the data where this field matches the AD ID of the logged on user.

    Thanks!

    Andy 

  • 02-24-2015 10:05 AM In reply to

    Re: I need a form that automatically fills some fields and allows the user to input others...

    Hi Andy,

    Thanks for the additional information and sending your form over. As it turns out, you are using a Custom SharePoint List form - and may not need to use CAML unless you are submitting data to a different SharePoint list. Going back to the topic, you will need to add the following:

    1. Create a new Data Connection which retrieves data from the same SharePoint list (StudentInformation)
    2. At the Form Load rules section, add a rule which sets the "ID-CougarNetID-Text" under the query field of the data connection added  in step 1
    3. Set the query field to the value of the "ID-CougarNetID-Text" from the "Main" data source (this filters the data when you query)
    4. Query the data connection added in step 1
    5. Set the values of the fields desired (do not forget to set the value of the ID field since this will indicate which row to update)
    6. Add a Submit button which submits data using the Main Data Connection

    I might have missed out on some parts but the idea of how to filter/query data and submit data by declaring the ID should work.

     

    Don Stephen Lambatin / Support Engineer
    Qdabra Software
  • 02-25-2015 09:51 AM In reply to

    Re: I need a form that automatically fills some fields and allows the user to input others...

    Don,

    Thanks for continuing to bear with me.  I've attached the new version of the form, I have the form load rules set so that the form loads the logged in user's ID into "field1," but I can't get the form to load any information from the underlying list.  I have a data connection which retrieves data from the list, but no matter what I seem to try, I'm unable to get any of the fields to pull data.

     Andy 

  • 02-25-2015 10:22 AM In reply to

    Re: I need a form that automatically fills some fields and allows the user to input others...

    Hi Andy,

    I have updated you form. Could you try this and see if the Admissions-GradDegree gets populated? If it doesn't, then there must be an issue with the username() function. Let me know how it goes.

    Regards, 

    Don Stephen Lambatin / Support Engineer
    Qdabra Software
  • 02-25-2015 10:45 AM In reply to

    Re: I need a form that automatically fills some fields and allows the user to input others...

    Your form gives me a domain permission error and InfoPath won't allow me to open it.  Is there a security setting in InfoPath I need to change?

     

     

    A 

  • 02-25-2015 10:53 AM In reply to

    Re: I need a form that automatically fills some fields and allows the user to input others...

    Kindly download the XSN, right click and open in design mode, and preview (click F5). That should do the trick.

    Regards, 

    Don Stephen Lambatin / Support Engineer
    Qdabra Software
  • 02-25-2015 11:00 AM In reply to

    Re: I need a form that automatically fills some fields and allows the user to input others...

     Don,

    I opened in Design mode, which brought it up as "Form1," I previewed and the Admissions-GradDegree did not get populated, though field1 does get populated by using the Username() function.

     A 

  • 02-25-2015 11:04 AM In reply to

    Re: I need a form that automatically fills some fields and allows the user to input others...

     I looked at what you did and it would appear that the condition was never met as the CougarnetID field never got set to the value of field1.  The Username() function pulled the right userID and displays it as I expect, but the CougarnetID field doesn't get the same value when I preview.

    A 

  • 02-25-2015 11:13 AM In reply to

    Re: I need a form that automatically fills some fields and allows the user to input others...

    I found one issue, the line where you tried to grab the Admissions-GradDegree field was set to compare field1 to PeopleSoftID instead of CougarnetID.  Sadly, I changed this but still got no data pulled.

     

    A 

Page 1 of 2 (25 items) 1 2 Next >
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.