Filtering InfoPath Form Data Based on Sharepoint Login

We have a form designed in InfoPath that updates a SharePoint list.  We've added a data connection in InfoPath to an SQL database that holds information we'd like to have populated in the form.  One of the columns in the database is username which
matches the username someone accesses SharePoint with.  
Our question is this - how can we add a filter or rule to our form so that when user x logs into Sharepoint, the form populates with all the data  in the SQL database for user x   
We've been able to pull all the data into the form for each user, but not a specific user like we're trying to. 
Any suggestions or reference would be most appreciated.  
Thanks in advance. 

Hello,
As i understand, you want to get filter data from SQL based on current user name. You need to use "where" operator in SQL query to get specific user data from SQL. First create a SQL connection and overwrite query in your code. Refer this link for code:
http://social.msdn.microsoft.com/Forums/sharepoint/en-US/5aa4519c-b8e0-4a7c-85b4-09f7e1d0747a/dynamic-sql-data-connection-in-infopath?forum=sharepointcustomizationprevious
Hope it could help
Hemendra:Yesterday is just a memory,Tomorrow we may never see
Please remember to mark the replies as answers if they help and unmark them if they provide no help

Similar Messages

  • How to submit InfoPath form data to multiple SharePoint lists at one time?

    Hi,
    I'm looking for a way to submit certain data in InfoPath form to separate SharePoint lists at the same time. I have a form that has two views with many data in them. I want to keep these data in separate SharePoint list besides keeping them in the XML. I know that you can submit to a form library using SharePoint document library data connection, but I'm not sure if you can use several data connections for submitting data to multiple SharePoint lists. Is it only possible to do using code? If yes, can anyone show a sample. I have never coded in InfoPath, though I used C# a lot in .Net.
    Thank you!Regards,
    R.D.M.

    This is an old thread but I tripped over a codeless method to do this with OOB InfoPath 2010 and SP 2010. 
    Assuming your main InfoPath form is published to a document library with the promoted fields that you want to see.
      Publish your form to a new document library to capture the secondary data fields that you want separated out.
    Using the Publishing Wizard do the following:
    Go to – File then Publish
    Select SharePoint Server “ Publish form to a SharePoint Library”
    Enter location of your SharePoint or InfoPath Forms Services Site: 
    accept the default in this field from the first published event
    Next screen, keep the default or change it, Form Library, Site Content Type or Admin Approved
    Next screen, What do you want to do?
    Create a new form library
    Add new document library name and description
    Next screen, Remove all promoted fields not applicable to the new library and add all of the ones you want to see data for.
    Click Next and Publish
    Come back into the form: If you don’t have buttons added directly to the form to submit or update, add them.
    Create a new Action rule on the button
    Label the rule to keep it straight
    Condition, occurs when button clicked
    Add action, Submit data
    Use data connection to the second library created
    Create a second new Action rule on the same button
    Label the rule to keep it straight
    Condition, occurs when button clicked
    Add action, Submit data
    Use original data connection to the library
    Then you can add another action to close the form or do whatever you need.
    Republish the form to both libraries to set the template for both.
    File – Publish – SharePoint Server
    Select Secondary library from drop down follow the rest of the prompts
    Follow step 5a again, select Primary library from drop down, Add back in all of the promoted fields needed for the primary library and follow the prompts.
    DOCUMENT YOUR FORM WELL FOR MAINTENANCE
    Special considerations, your primary library needs a unique ID to reference in your secondary library.
    Your secondary library will need a unique ID that is not related to the primary if you are going to store multiple records for a single primary library reference. 
    Example: One form, multiple updates.

  • How to display filtered data based on user login

    We have a SSRS report (.rdlc) which gives the report about Online count of machines. Report is incoperayed in Asp.net.
    We have many filters in This report. Now we have to retrict the report based on user login to the application .
    For ex: report has a drop down for Regional Admin. Now if one person login to the application he has to view only his region online count.
    How can we do this in SSRS?. We have our application hosted in Microsoft Azure . Please suggest

    Hi csmbrnoc,
    In Reporting Services, if we want to filter data based on user login, then there must be some relationship between the UserID and the Region in the dataset. For example, there is a field named UserID in the dataset, and each ID map some region and the corresponding
    “Online count of machines”. In this scenario, just as Visakh suggested, we can use built-in field User!UserID to obtain UserID of the current user, then directly add a filter to the dataset as below:
    Expression: [UserID]
    Operator: =
    Value: [&UserID]
    If there are any other questions, please feel free to let me know.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • How to create Reports for the infopath form data

    Hi All,
    I have a requirement to generate reports in SharePoint based on InfoPath form data which is submitted into form library. Do I need to store each InfoPath form data into SQL Database/MS Access Database. if yes, can any one  help me on this how
    to save InfoPath form data into DB while submitting into "Form Library". based on the data stored in DB how to create  and view the report in SharePoint?.
    Thanks in Advance,
    Satish
    Thanks & Regards Satish Dugasani

    Thank you for asking the questions for clarification, my requirement is like below
    1. Need to insert all infopath form fields data into Access Database when i am submitting to the Form library
    2. Create Access Reports like based on time period, based on submitter name, based on state, city, and combination of these etc.
    3. Sync Access Database every time i am updating the form
    4. View Access Reports in share point site
    PS: I worked on this like below approch
    1. Written Web Service to Sync Access Database for the Infopath form
    2. Create Access Reports
    3. Publish using "Publish to Access Services" by providing site URL it will create a subsite there i can able to see reports, tables, macros etc. but that is not an user friendly like i am not able to apply my branding because it is pointing to /_Layouts/accsrv/Modifyapplication.aspx.
    could any one suggest me on this.
    Thanks & Regards Satish Dugasani

  • How to determine Organizational Data based on User Login

    Dear all,
    How to determine organizational data based on user login in Activity transaction, currently org determination is happening after entering customer number in the transaction.
    We have used 'Responsibility' determination rule for this configuration. Now the requirement is to determine org data based on user login.
    In Org model we have assigned user to org data through a business partner. But still org data is not getting determined in the transaction.
    Please help me to trace out the problem.. your suggestions will be highly appreciated.
    Best regards
    Raghu ram

    You just have to use other organization determination rule. In your case this would be rule 10000194 (ORGMAN_12). This determination rule delivers the responsible organizational unit of the user
    User is defined as a business partner in the container attribute 'PARTNER'. If not, the system user (sy-uname) is used.
    So you have to do the following:
    - use this determination rule
    - in BP link username with employee
    - assign in PPOMA_CRM employee or user to organizational unit
    This should solve your problem.

  • Filtering report data based on user login and Parameter fields

    Post Author: mronquillo
    CA Forum: General
    Hi,I am running a report that filters data based on the user login. To do this, I created a formula called @user that compares the login name (using the CurrentCEUserName field) and returns the user's name. If the user login is not a login specified in the if statements, it returns the parameter field "user_name":For example: if CurrentCEUserName = "loginname1" then "User's Name 1"else if CurrentCEUserName = "loginname2" then "User's Name 2" else if CurrentCEUserName = "loginname3" then "User's Name 3"  else if CurrentCEUserName = "loginname4" then "User's Name 4".. .else {?user_name}   In select expert, I have a condition which filters data based on the string returned from that formula:{Table.Name} = {@user}  This works fine and when the users run the report they only their own data. However, they are still prompted to choose a parameter field regardless if of the value returned by the @user formula. Oddly enough, regardless of what parameter field they choose, they will still only see their own data (i.e. if John chooses "Bob" from the parameter list, he will still only see John's data.)If I remove the "else {?user_name}" line from the @user formula, then the users are not prompted anymore. However, if they are not a "valid" user - that is, if any of the if statements in the formula are not true for their login name - then they will see no data. What I want to do is make the report ONLY prompt the user to choose a parameter field if their login name is not "valid". That is, if the @user formula is able to return a string value for their login name, then they will jump right into the report without being prompted to choose a parameter - otherwise, the user will be prompted to choose a name from the parameter list. I thought my formula would allow this (hence the "else" clause), but it seems that if a parameter field is present in any formula, then the report automatically prompts the user to choose a parameter. Is what I am trying to accomplish possible in CR (I'm using CR v10.0) or is there a better way to do what I am trying to do?Thanks in advance.

    Post Author: sharonmtowler
    CA Forum: General
    try, or something like that
    (if CurrentCEUserName ={?user_name} then true else ({Table.Name} = {@user}) )

  • How to view data from infopath form that submit into sharepoint list into another page in sharepoint

    what I want to do is, User A as administrator, will fill in the form. Next User A will assign task to User B, to complete the form. when User B open the form, the above part of the form will displayed data that fill by User A. Field that User B need to fill
    in is at the below of the form. 
    may I know how to do it step by step? Thank you for your answer. 
    Azuaniza Ariffin

    Hi,
    I saw a similar post by you on this forum, and to achieve the functionality you can try using InfoPath Form or JQuery with SPService to make part of the Form as Readonly. and in conjunction use SharePoint designer to create a workflow to assign task or send
    email to user B.
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/d02389be-f267-4c09-baf1-d85a5429bafb/set-field-value-and-make-field-read-only-on-custom-list-form?forum=sharepointgenerallegacy
    http://www.sharepointdiary.com/2013/07/how-to-make-sharepoint-list-column-form-field-read-only.html#ixzz2aH103rcM
    Hope this helps!
    Ram - SharePoint Architect
    Blog - SharePointDeveloper.in
    Please vote or mark your question answered, if my reply helps you

  • Sharepoint 2013 Infopath form Date Picker causes screen to move shift to the top in non-IE browsers

    I created a list in Sharepoint 2013 that has a date field. I then created an Infopath form that has that date field in there. When I go to insert a new item in the list, clicking on the datefield brings up the calendar control. In IE the page doesn't move,
    in non-IE browsers it moves the page to the top. Is there a fix for this?

    Also want to know how to fix this behaviour!

  • In Sharepoint browser enabled Infopath form Date & Date Time Pickers throws Script errors using https url.

    HI All,
    I am working in Sharepoint 2010 browser enabled Infopath form and is have two Infopath date picker controls. The form is working fine in normal "http://" url. while the same site we are using opening with "https://" and select the date
    from picker then we got the script errors.
    There are no scripts used in this site. It is by default sharepoint 2010 publishing site.
    One more i checked with "Date Time picker" Infopath control also but same issue.
    Below are the errors for reference:-
    Any help is appreciated..!
    Thanks.

    Thanks Linda, for your quick response.
    The  Minimal
    Download strategy  feature is not available
    in SharePoint 2010 and start.js file is also not available.
    can you please suggest the exact location of "start.js"
    file in SharePoint 2010 then i go further or please suggest other way to find or debug the process.

  • Infopath form data coming only for published user

    Hello,
    I have published one web browser based infopath form all the data is coming only for me ,but when other user opened that form with his/her loginid all fields are blank.Why is it so? Any help
    Thanks,

    Hi,
    According to your description, my understanding is that the form data cannot be displayed when other users accessed the form.
    As Hemendra suggested, please check if there are any rules in the form to display the data to specified users.
    To match a user with the current login user, then we can set the filter with AccountId inside the Login Account group to equal userName() to get the corresponding employee id.
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • How to manage XFDF form data stored in sharepoint

    Hi All,
    I have developed a rating form tool in acrobat to get the readers feedback. I am saving the feedback data in a sharepoint when the user click the SUBMIT button. It is working very well and the feedback data is getting stored in the Sharepoint.
    Now, its time to generate a report based on the feedback I am receiving in the Sharepoint. I need to collect the data from the sharepoint and generate a report for the management.
    Is there anyway to pull the data from the Sharepoint directly from Acrobat? and when the pdf file is getting distributed there are lot of additional characters being added after the pdf file name (4AA0-1068EEW_7c9ab3f540b39941be0626d074eec68a.xfdf). It results, when I try to copy the .xfdf files from sharepoint to my local folder, Windows says "The file name is too long and cannot be copied" and hence I miss some of the data stored in the sharepoint.
    Someone, please help me to collect and manage the data and generate a report.
    Thanks in advance.
    Regards,
    Muthuraj. D

    Create a servlet which gets an InputStream of the file and writes it to the OutputStream of the response and call this servlet in `src` attribute. That's basically all.
    Here's an example which covers the most of the minimum needs: [http://balusc.blogspot.com/2007/04/imageservlet.html].

  • Update query against InfoPath form data

    Hi,
    We are using SharePoint Enterprise 2010, and have set up a series of InfoPath forms to manage various aspects of the projects we run (request forms, change control, toll gating, status reports, etc).  The forms are all created in InfoPath and save the
    data to form libraries on SharePoint.
    We are in the process of revamping the status report.  The fields for Accomplishments, Planned Activities, Risks and Dependencies were origianally set up as plain text.  We are moving to a bullted field for each.  My concern is that once we
    add the new fields to the published form, the old ones will disappear fom view.  So if we pull up an older status report, the information wont be available to view.
    Is there any way to write an update query against this form data?  Supposed I add a new bulleted field for "Accomplishments_NEW" and change the existing field to "Accomplishments_OLD".  If I were working with in Access, it would
    be a simple update query where the field selected would be "Accomplishments_NEW" and the update value would be "Accomplishments_OLD".  I have actually tried this through Access but we only seem to be able to read this data through
    Access, not write to it.
    Is there any way to make such a change on the SharePoint side?
    Dennis

    Yes.
    The approach is to add two fields:
    - Accomplishments_v2 and Accomplishments_v1_Loaded (true/false)
    when the form loads, if _v1_Loaded is false, migrate the data from the old field into _v2, and then set _v1_loaded = true
    Scott Brickey
    MCTS, MCPD, MCITP
    www.sbrickey.com
    Strategic Data Systems - for all your SharePoint needs

  • How to restrict an infopath custom view based on SharePoint group or security group membership?

    Hi,
    I have created a custom view in InfoPath Designer 2013 based on a SharePoint online - custom list.
    Right now the custom view is available for all users in the "View:" dropdown under the "PAGE DESIGN" tab in InfoPath.
    I would like to make this view available only to a set of users. (i.e., users of a SharePoint group / Security group).
    Please let me know how I can do this..
    Thanks,
    Thanan

    Hi Thanan,
    We can use check the current user permission using REST API in SharePoint 2013, then hide the dropdown the "View" base on the permission.
    The following articles for your reference:
    SP2013 REST API – Find if user is member of SharePoint group
    http://simonovens.wordpress.com/2014/08/13/sp2013-rest-api-find-if-user-is-member-of-sharepoint-group/
    Quick Tip: Using JQuery to hide options in a select
    https://formidablepro.com/help-desk/quick-tip-using-jquery-to-hide-options-in-a-select/
    Best Regards
    Patrick Liang
    TechNet Community Support

  • How to schedule report filtered by dynamic date based on the date the Agent runs

    Hello
    I have a question about delivering report using OBIEE agent.
    If i am running an agent today to deliver report A, can I get report A based on Last Monday's date or any dynamic dates?
    For example, say today is Dec 18th 2013 and my agent is running according to how I set the schedule. Now the deliver content will have report A being delivered. Now report A has a date column, normally this column is filtered by current date. But if it's delivered through agents to various users, Report A's data should be the previous Monday, so in this case Dec 9th 2013. When this agent is run again said on Dec 27th 2013, then report A should be filtered by Dec 16th 2013, which is the previous monday of Dec 27th.
    Can something like this be achieved in OBIEE 11G?
    Thanks in advance.

    Yala,
    Not a straight forward way
    1) Let the report run through Agent with Current Date filter
    2) once it ran for the first time you can see IBOT name/last run time(LAST_RUNTIME_TS) in  S_NQ_JOB
    Create a repository variable 'last_run_agent' using below sql to get max(LAST_RUNTIME_TS)
    select max(LAST_RUNTIME_TS) from s_nq_job where name = 'AGENT_NAME';
    Edit the analysis report with current date filter and modify the filter condition accordingly to filter on newly created repository variable
    Thanks,
    Saichand

  • (infopath) Form to edit a Sharepoint List

    Hi all,
    Let me explain what I need to achieve here:
    I have an Excel spreadsheet with many project records. On each record, half of the columns are populated and the other is blank.
    I need to complete that information with the help of every project manager, but as there are so many records, I think giving them the chance to complete it by themselves in Sharepoint is a good idea (if it can be done, I know it can).
    So my idea is, every project manager enters the Sharepoint Site and clicks on the place where the list/form/I-don't-know is, he must only see the records that he manages, there is a Person column for that.
    He goes into the form and it shows the first record. He completes it and hits Next. The second records appears to be completed.
    Or she clicks on every record to complete it, but they must only see the records filtered by her user name.
    I know nothing of Infopath and Sharepoint, I was trying to make something but it's very difficult to me.
    Guys, if you can suggest other solution using Sharepoint and/or Infopath, please let me know.
    Regards,
    Stuart

    Hi Stuart,
    Based on your description, my understanding is that you want to let the users to edit their own records in SharePoint.
    If I misunderstood, please feel free to correct me.
    I recommend to export the Excel spreadsheet to SharePoint list and then modify the view by the Person column.
    After that the user will see their own records when they access the list in SharePoint, and they need to open each record and edit it.
    Here are the detailed steps:
    Open SharePoint site in the browser, click Site Actions menu and select More Options under New Site.
    In the pop out dialog, select List under All Types. Then select Import Spreadsheet and click Create.
    Type the Name and Description, select the Excel spreadsheet in your computer and click Import.
    Click Modify View button in List tab and set the filter to be like the image below:
    You can also refer the links below for more details:
    How to Import an Excel Spreadsheet into a SharePoint 2010 List:
    http://www.dynamics101.com/2013/07/import-excel-spreadsheet-into-sharepoint-2010-list/
    Custom List View Based on Current User Using SharePoint Designer:
    http://go.limeleap.com/community/bid/297846/Custom-List-View-Based-on-Current-User-Using-SharePoint-Designer
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

Maybe you are looking for

  • Update: Video - Canon 6D turns itself off after a few shots with fully charged battery

    Update: I uploaded my video to youtube, please comment: http://youtu.be/3PNLUYd8g7A TIA and pardon me for my English. I posted this originally at another forum, and somebody suggested me to post it here as well, to get more help. Long story short, I

  • Nikon D7100 NEF Issues with APE11

    I have a Nikon D7100 and Adobe Photoshop Elements 11.  The problem is, the software doesn't recognize NEF files.  Doing some research, I downloaded the DNG converter but it doesn't recognize NEF files.  I tried updating the PSE11 software but I keep

  • Printer Preferences is not available when printing PDF

    Printer Preferences is not available when printing PDF I have a PSC 1315 printer I have been using for several years on a system with Windows XP without any problem.  After purchasing an HP Pavilion 500 with Windows 8.1 Pro, I migrated my printer to

  • IC Agent Role Log - off

    Hi Experts, Does Bussiness Role IC Agent will not have log - off option( If their how to log off?) . Can you please brief me on this. regards, Sarangamath

  • Flash file asset won't play when specified by a variable.

    I have several Flash assets that I want one of played basied on the value of a variable that contains a file location. I've tried =variable for the file name as I use in sound, movie and display icons, but it doesn't seem to work for the flash player