Autopopulate (or search?) form using (mostly) Text Boxes - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Autopopulate (or search?) form using (mostly) Text Boxes

Last post 01-15-2019 12:42 PM by Hilary Stoupa. 16 replies.
Page 1 of 2 (17 items) 1 2 Next >
Sort Posts: Previous Next
  • 01-07-2019 06:08 AM

    Autopopulate (or search?) form using (mostly) Text Boxes

    Good morning!

    Thanks for such a great forum! I've poked around here for information/help before, but now I'm a first time caller as I think I'm in over my head.

    I've been searching off and on for the better part of 3 days now, and haven't come up with an answer. I apologize if this has already been addressed, but at this point my eyes are revolting and I'm whupped and need help.

    Been using SP for years, but I'm new to InfoPath Designer (~7+ months experience). I'd always used 2013 and SP Online at my previous employer, I'm currently using SP 2010 and IPD 2013.

    I'm only the site administrator, I do not have direct access to the SP Farm.

     

    Here's what I've got going on. Coworker wanted two databases to house data on patients. Took a look at what they were asking, and decided it'd be better to use SP rather than Access, for myriad reasons.

    So, I have both forms created. They feed to corresponding SP libraries and working flawlessly, save for one issue:

    They would like both to have the ability to autopopulate (or search, possibly?) the forms when entering in information on a patient that's already been seen and had the form filled out for them as some areas of the form could have changed.

     The forms are fairly simple, mostly using text boxes to input data directly, but they do use a few drop-down lists and multiple-selection list boxes. 99% of the pertinent information is housed in the text boxes, I can live with it if I'm unable to make the drop-downs or multi-selects work.

    I have come across myriad tutorials on how to create autopopulating forms, but:

    - None of them refer to using text boxes (usually drop-down lists, etc.)

    - All of them require that the SP developer create a list of pre-existing data so that the form can pull from it as users type in

    I don't have the pre-existing data, it hasn't been entered in yet. I don't know the patients that will come in to be seen and what the situation will be.

     

    So my questions are:

    - Is there a way to autopopulate forms that use textboxes, drop-downs, and multi-selects? If so, any idea where I'd begin to search for info on that? 

    - Is there a way to have the form autopopulate based on what is already in the SP library? Meaning, there will be no autopopulation at first for patients that haven't been seen, but once they've been seen, the form can pull info from the library?

     

    Thanks in advance. Apologies if this post is long and convoluted. I'm just pulling my hair out trying to figure out what the possible solution might be.

     

    Best,

    Derek 

     

  • 01-07-2019 08:15 AM In reply to

    Re: Autopopulate (or search?) form using (mostly) Text Boxes

    So - multi-selects are going to be an issue. They are bound to a repeating field in the form's schema, and there is no rule-based way to add nodes. Dropdowns should be ok, just keep an eye on what you have as the "value" setting for the dropdown (i.e., if you are storing an item's ID in one form, you'll want to set up the dropdown in the other form the same way - if you are searching cross-library, see next question). Are you looking to search from one library to another? Or is this in the same library? Regardless, you'll need to promote on publish all the fields you want to be able to pull back. I'm going to assume that you are looking in the same library, just for the sake of simplicity. In your library, make sure you have promoted whatever you use for a patient identifier - probably not name, since those can change (and be misspelled, and so forth). So in your form, you could create a data connection to the library you want to query. Don't query on load. User enters patient ID, and clicks a button (or you could do it on patient ID change, up to you) and you can populate the query field in that data connection with the patient ID. Then run the query. Now you should have back all the data from the library that matches that patient ID. If you set up the query to sort by Modified date desc, the first entry would be the latest.... so then you can just set fields in your form to the matching fields from the library. Does any of that make sense? If not, let me know - it is Monday morning and I'm not always coherent on Mondays.
    Hilary Stoupa

  • 01-10-2019 01:06 PM In reply to

    Re: Autopopulate (or search?) form using (mostly) Text Boxes

    Thank you so much for the response, Hilary. I apologize for the delay in my response, I've been slammed this week.

    I think I understand what you're saying. Let me clarify my situation more though so as to make sure it's right in my head and that I'm asking the right questions.

    So, I have the two separate InfoPath forms that are submitting to two other separate SharePoint Libraries. There's no crossover at all, they'll never connect or share data of any kind.

    What I'm looking to do is have a system put in place that will auto-populate the form information on patients that have already been seen, so that we don't need to re-type names, phone numbers, etc., unless they've changed. Most of the fields will be text boxes, with a few dropdowns as well.

    I do have multiple selection boxes in both of the forms, but I don't need those auto-populated as they will likely change from patient visit to visit. I'm checking to see if we have unique alpha-numeric IDs we can go by for each patient in order to make things easier, don't have an answer yet.  

    That being said, here are my questions (sorry if I'm being redundant, this is all pretty new to me):

    - Can you do a data (receive) connection from a SP Library back to an IP form, or does it have to be a SP List? 

    - If we don't have unique alpha-numeric IDs, is there a way to make the form auto-populate based on our text entry? For example, let's say Samantha Smith has come in for a checkup. The end user types in "Smith" in the last name field, and the form auto-populates for Alex Smith (I would assume because Alex is the first alphabetically in the list), but could it be changed correctly if the user then went down and typed "Samantha" in the first name box? Again, I know how problematic only using names will be. I hope we have unique IDs, but if not, I have to work with what I have. :(   

    - When we start using the form, the SharePoint Library will be empty. Assuming that the data (receive) connection is correct, will the form start pulling and auto-populating once there are records of returning patients in the Library, or does the Library have to be pre-populated with data?

    and lastly...

    - With my multiple-selection boxes, when the form is submitted to the SP Library, they all show up under the same column (no commas, not space delimited). Aside from creating individual controls/data for each option, is there a way to use the multiple-selection boxes but have the responses broken out into individual columns? I don't have access to the SP server per se, so I can't use any coding to accomplish this. Any thoughts?

    Thanks again, I really appreciate you taking time to answer my (probably) dumb n00b questions. 

     


  • 01-11-2019 08:39 AM In reply to

    Re: Autopopulate (or search?) form using (mostly) Text Boxes

    You can create a query connection to a SharePoint Library (a library is actually a type of list!). You will have trouble matching on just last names - but you could query for all last names, show the secondary data on the form, and have a button in each row the user could click to populate the main form - I could dummy up a sample if that would help? If there are no records in the library, there won't be any data to prepopulate, but once there are records, things should work. Of course, for development and testing, you are going to have submit some data to work with. :) There is no way to use multi-selects and break things out into individual columns / rows - they will be merged on promotion if you want to see all data.
    Hilary Stoupa

  • 01-11-2019 08:52 AM In reply to

    Re: Autopopulate (or search?) form using (mostly) Text Boxes

    Hi Hilary, I hate to ask, but a dummy sample would be great if you have the time. I figured a workaround for the multi-select list and just created individual checkboxes to create the columns. Only issue is that the Boolean output is either True/False. I tried using an action rule that would set the field's value to its local-name if the field was checked (True), but it gave me an error and I'm not sure what I did wrong. Is there a way to convert a Boolean response so that it enters specific text in the corresponding row in the SP Library?

    Thanks again for all the help, you don't know how much it's appreciated. :) 

  • 01-11-2019 03:56 PM In reply to

    Re: Autopopulate (or search?) form using (mostly) Text Boxes

    I'll get a sample put together - but I don't understand this additional question at all - can you attach a screenshot or something that might help me? You can attach files under the options tab.
    Hilary Stoupa

  • 01-11-2019 04:25 PM In reply to

    Re: Autopopulate (or search?) form using (mostly) Text Boxes

    Save the attached file locally, right click the saved file and select Design. Then you can preview and check it out. I've use an XML file for data so you can see what I mean, and added some instructions about what will be different for your actual form.
    Hilary Stoupa

  • 01-14-2019 05:18 AM In reply to

    Re: Autopopulate (or search?) form using (mostly) Text Boxes

    Many thanks. I figured out how to fix the Boolean issue. I set up an extra text box to serve as the "real" field and a rule that states when the checkbox is checked, it sets the value of the "real" field to 1. I then set another rule to always hide the "real" field so the end user doesn't see it. Maybe not as elegant as it could be, but it works. :D 

  • 01-14-2019 05:20 AM In reply to

    Re: Autopopulate (or search?) form using (mostly) Text Boxes

     You're the best. I'll take a look at it right now. Again, a million thanks. If I'm ever in your neck of the woods, a beverage of your choice is on me. :)

  • 01-14-2019 06:54 AM In reply to

    Re: Autopopulate (or search?) form using (mostly) Text Boxes

    Hilary,

    This is PERFECT! Thank you so much! I am hoping to snag a few minutes with the stakeholder today to nail down if we have unique data that we can use (hopefully), but either way, this is FANTASTIC!

    I really cannot put into words how tremendous your help has been. I've actually watched some of the Qdabra* videos on YouTube in the past, and they've helped out as well.

    I hope to one day pay it forward to someone else in a situation such as myself. Again, a million thanks! 

  • 01-14-2019 07:38 AM In reply to

    Re: Autopopulate (or search?) form using (mostly) Text Boxes

    Happy to help :)
    Hilary Stoupa

  • 01-15-2019 07:34 AM In reply to

    Re: Autopopulate (or search?) form using (mostly) Text Boxes

    Back for (what I hope) is my last question:

    When I create the secondary (receive) data connection that links to my SharePoint Library, by default the Groups it creates aren't repeating ones, and it doesn't allow me to make any of the Groups repeating, so I am unable to use a repeating table like you did in your example.

    I can link the individual text boxes to the correct field on the SP Library, but it tells me that the repeating table needs to be linked, and when I go to link it, it says something like the table can't be linked to a Group that isn't repeating. I've tried everything and it's not playing nice. Any ideas?

    There are no repeating fields in the form with the exception of the one for the patient lookup, by the way. 

  • 01-15-2019 07:59 AM In reply to

    Re: Autopopulate (or search?) form using (mostly) Text Boxes

     Disregard. I've been looking at this so long I'm missing stuff. Was linking to the query fields, not data. <sheepish grin>

  • 01-15-2019 08:17 AM In reply to

    Re: Autopopulate (or search?) form using (mostly) Text Boxes

     Ok, I think this is it, if I can get this figured out, I'm all set!

    Again, Hilary, there aren't enough thank-yous in the universe for all the help you've given. In doing searches I've seen countless replies from you to other frustrated developers. You really are a special person and I hope that you will be rewarded in kind somehow, some way.

    So, here's the last headache. Everything is set (with the exception of writing the rules for the select button), but when I either preview the form or go to the live version, all the records that I've entered all show up from the start. It isn't like yours where you type in the name, click and then the people with that specific last name show up. It shows all the entries I've put in so far for testing (3 total.)

    I'd attach an image, but I don't have it uploaded to anything and I think our firewall would block it anyway.

    Any thoughts? Thanks again so much! 

     

  • 01-15-2019 10:26 AM In reply to

    Re: Autopopulate (or search?) form using (mostly) Text Boxes

    This is a setting in the data connection. Walk through the data connection again, and on the last (or next to the last, I forget which) there is a checkbox indicating if the query should run when the form opens - deselect that. Then in your rules, set the query field & execute the query to get back just the stuff you want. :)
    Hilary Stoupa

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