Drop down menu conditional formatting problem - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Drop down menu conditional formatting problem

Last post 11-25-2014 08:59 AM by Hilary Stoupa. 22 replies.
Page 1 of 2 (23 items) 1 2 Next >
Sort Posts: Previous Next
  • 11-19-2014 09:44 AM

    Drop down menu conditional formatting problem

    I have copied and pasted a part of an excel document into my info path document. In one of the empty table boxes I have put a drop down menu. In that menu I have a display option that shows "1-4" (somewhat of a placeholder (there is no value)). I have then also put 4 other options all counting up to 4 from 1 ("1", "2", "3", "4"). When I select 1 and 2 I want the box or for something to be red. If the numbers are 3 or 4 I want it to be green with a green background. This doesn't seem to be working. I have tried to play around with every condition in the conditions box and nothing seems to work. Any suggestions?
  • 11-19-2014 11:53 AM In reply to

    Re: Drop down menu conditional formatting problem

    Hi - any chance you can attach your form under the Option tab in a reply? I'm having a little trouble understanding your description. :)

    Hilary Stoupa

  • 11-20-2014 07:44 AM In reply to

    I attached a copy. Yes that description was backed by frustration... :) Thanks for replying. Hope you can help.
  • 11-20-2014 07:57 AM In reply to

    Darn those "and"s and "or"s. :)

    You have as a condition - field = 1 AND field = 2. It can't equal both at the same time. Use OR on those conditions. In the attached file, I've changed the condition on field161.

    Save the file locally, then right click and select Design to open in Design mode - as you may know InfoPath templates get fussy about being moved around.

    As an aside - You might want to consider changing some of these field names from the default - or perhaps using a repeating schema instead..... If I have a chance later today, I'll post a sample with a schema that would be easier to work with.

    Hilary Stoupa

  • 11-20-2014 08:06 AM In reply to

    Re: Drop down menu conditional formatting problem

    Thank you very much. It's amazing the how the simple things can make a difference. Much appreciated. Will changing the field names be beneficial to me? I mean at the moment it doesn't seem to be an issue for me. I'm open to learning about a repeating schema all the same though. Thanks, Jay
  • 11-20-2014 08:09 AM In reply to

    Re: Drop down menu conditional formatting problem

    Also is there a way to then apply this rule easily to all the drop downs on the page? I'd rather not go through them all..
  • 11-20-2014 09:25 AM In reply to

    Re: Drop down menu conditional formatting problem

    So I have run into a problem. The purpose of this form is to be viewed in PDF form after completed. The colors do not show up on the pdf once it has been generated from the form host (Formotus). Hopefully that makes sense to you. What I'm asking is if there's a way to make those colors show once the form has been submitted. Thanks, Jay
  • 11-20-2014 09:40 AM In reply to

    Re: Drop down menu conditional formatting problem

    So - is the PDF export part of Formotus? If so - you might want to file a help ticket with them, see if they know anything on this.

    As to your other questions - the reason I would use a repeating schema for the form is so you don't have to add the formatting to a kajillion controls. :)

    The benefit to meaningful field names is that it is easier to read and understand your rules. If you look at an XML file in a text editor, the data has meaning if the field names have meaning. It can make the form easier to work on. You don't have to rename them - but it does make things easier in the long run.

    Hilary Stoupa

  • 11-20-2014 09:52 AM In reply to

    Re: Drop down menu conditional formatting problem

    Ok good point. I will probably make changes to the names of the fields. I'm very interested in how to use the repeating schema as I have a lot of fields that need that format. I don't know if it is difficult or easy but if you could point me in a general direction I can probably figure it out. Is it similar to a "style" or "master" (not sure if your familiar with indesign or anything of that nature)? So a style would have one setting for any text with that style selected (font, font size, color). I have sent a message to support team so hopefully they have an answer for me. Thanks again, Jay
  • 11-20-2014 11:59 AM In reply to

    Re: Drop down menu conditional formatting problem

    Here is a sample of your form with a repeating schema - you'll have to preview to see the 4 lines I added to the table. I did that in the default values (under the Data tab in the ribbon). You can also save the form as source files (back up first!) from Publish > Export Source Files and then manually add rows / values to template.xml

    Hilary Stoupa

  • 11-21-2014 07:37 AM In reply to

    Re: Drop down menu conditional formatting problem

    So there is no way to re-format what I have done already? What I understand is that I will have to input all of the data into a new type of table (repeating table). I tried to re-do what you did with that table and I can't seem to. For one, I don't know what Xpath is. That's what I saw when I looked at the properties under the first three columns. Also, I don't understand why it will only show all four lines in preview mode. How did you edit the other three in the first place?... As you may notice I'm trying to learn this program as I'm going I hope you can bear with me.
  • 11-21-2014 07:48 AM In reply to

    Re: Drop down menu conditional formatting problem

    Everyone is new at everything at some point and time, right?

    So - first off - if you are already using this form, you should probably not change the schema (rename fields) - because then the saved files won't open correctly with the changed template.

    But if you aren't already using this form, you might want to go to the work of changing it now, so that it is easier to maintain down the road.

    In the first three columns, I'm using the calculated value control. With that control, you can pick a field or use a formula to display information on a form. I used that because I was assuming that you didn't want users to change values in the first three columns.

    I'm using a technique here of setting what is called the default data for the form. I might be telling you stuff you already know - but just in case you don't:

    1. In these files, you will find a file named "template.xml" - InfoPath uses that every time a new form is created
    2. If the template.xml has defaults in it, InfoPath will use those defaults when you open a new form.

    Now, you don't have to enter defaults in the template.xml file - InfoPath has a way to do that via the UI. You can go to the data tab on the ribbon, and toward the far left, you'll see a little section titled "Form Data" - there is an item there called "Default Values". If you click that, you should be able to expand the new group I added to your form, and see where I inserted a number of rows and set values.

    Given how many items your form has, I would think this would be tedious to do via the UI (which is why when I set up the sample, I just added rows to the template.xml). The reason it only shows in preview or when you fill out the form is because IP is not displaying it with all the data from the template in design mode.

    However, you can see in my sample I now only have 2 drop down controls to format. :)

    Hilary Stoupa

  • 11-21-2014 08:18 AM In reply to

    Re: Drop down menu conditional formatting problem

    I have read over your instructions a couple hundred times :). So before you did anything on the form (to make that table) you went to the template? Or did you select a repeating table first and then go to the template? When I select default values when I have selected the 8 column table I have made, all the fields I've made are checked. I don't understand how to input anything. I have changed the first three columns to the calculated value control- that's good. I'm currently now going to try and export the file and view the template document. Does all of this make sense? Jeesh, thanks. :)
  • 11-21-2014 08:18 AM In reply to

    Re: Drop down menu conditional formatting problem

    I have read over your instructions a couple hundred times :). So before you did anything on the form (to make that table) you went to the template? Or did you select a repeating table first and then go to the template? When I select default values when I have selected the 8 column table I have made, all the fields I've made are checked. I don't understand how to input anything. I have changed the first three columns to the calculated value control- that's good. I'm currently now going to try and export the file and view the template document. Does all of this make sense? Jeesh, thanks. :)
  • 11-21-2014 08:27 AM In reply to

    Re: Drop down menu conditional formatting problem

    First, I added the repeating table to the form (just from the InfoPath controls). Then I went to the default data to insert additional rows and enter some values - you don't have to edit template.xml, you can use the UI, and probably should. :) I'm attaching a screenshot that I hope will help clarify.


    Hilary Stoupa

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