Alert Message if more or less than 100% - InfoPath Dev
in

InfoPath Dev

Alert Message if more or less than 100%

Last post 03-13-2017 07:12 PM by Flyingtiger. 10 replies.
Page 1 of 1 (11 items)
Sort Posts: Previous Next
  • 03-05-2017 09:31 PM

    Alert Message if more or less than 100%

    Dear all,

    Please can you be so kind and provide me some help. I have created a new InfoPath Form with many dropdown menus and even the possibility to use a data connection (XML) to lookup for countries. So far so good.....but I struggle with the following scenario :

    I have Two fields : Private in % and Public in %. Those Two fields have a dropdown menu from 0 - 100 and I would like to set an alert message if public% and private% add up to less then, or more than 100% ! Is that possible and if yes, how ?

    I am using InfoPath 2010 

    Thanks,

    FlyingTiger 


  • 03-06-2017 07:53 AM In reply to

    Re: Alert Message if more or less than 100%

    If this is a browser form, you can add a calculated value to your form with the message you wish to display and use conditional formatting for displaying it. If this is not a browser form, you could add a rule to each of these fields to display a message box popup if both are not blank, based on the value. See the attached sample - save the file locally, right click, select design and you can take a look at it or preview it. I used slightly different approaches on each - for one, I used a field w/ a default and set the rule on that. :)
    Hilary Stoupa

  • 03-07-2017 12:57 AM In reply to

    Re: Alert Message if more or less than 100%

     Dear Hilary,

    thanks a lot for your prompt answer with all the details. I did as you told me and it works just PERFECT ! ;-)

    Can I ask you another question as well ?

    I have a dropdown menu with Four choices. Based on that, another dropdown menu should have limited choice, based on the First Dropdown, as well.

     For example :

    1. Dropdown with Options like : Germany, France, Italy, Spain

    2. Dropdown menu with : Berlin, Barcelona, Paris, Lyon, Roma, Hamburg, Valencia, Madrid, Strasbourg, Cologne, Bremen....and so on.

    So if I choose Germany in the First Dropdown, the Second Dropdown should just show me Cities from Germany. (Berlin, Hamburg, Cologne, Bremen...)

    If I choose Italy, the Second Dropdown should show me only cities from Italy. 

    Is this possible, with Rules only ?

    Best regards,

    FlyingTiger 

  • 03-07-2017 07:44 AM In reply to

    Re: Alert Message if more or less than 100%

    This is completely possible - does your data for your dropdowns come from secondary data connections, like SharePoint lists? Or do you currently have the options typed into the drop down properties?
    Hilary Stoupa

  • 03-07-2017 04:09 PM In reply to

    Re: Alert Message if more or less than 100%

     Dear Hilary,

     thanks, I have typed the options into the drop down menu as well.

    Best regards,

    FlyingTiger 

     

    Hilary, I have been able to create an XML file with Countries and Cities, which works just perfect :-) BUT, I am not smart enough to use this data for my drop down lists :-( If I choose at the First Drop Down "Germany", the second Drop Down list shows me all the German cities, which is Great. But if I choose "Italy", nothing can be shown at the second drop down list. Can I only just add one Filter ?

    Thanks,

    FlyingTiger 

  • 03-08-2017 07:12 AM In reply to

    Re: Alert Message if more or less than 100%

    I was going to suggest XML, so I am glad you took that approach! Your filter should be basically if country in the secondary data source = selected country in the main data source. Attach your form to a reply under the Options tab & I'll happily take a look at it. :)
    Hilary Stoupa

  • 03-09-2017 07:59 PM In reply to

    Re: Alert Message if more or less than 100%

     Again, thank you :-)

    I have attached the file, which is very very basic.

    Regards,

    FlyingTiger 

  • 03-10-2017 07:18 AM In reply to

    Re: Alert Message if more or less than 100%

    See attached - save locally, right click & select Design to open - you'll see the filter is changed on the City dropdown under the dropdown properties to make it dynamic (based on the Country selection). For future reference, this is usually referred to as "cascading dropdowns" - One thing that is challenge when learning something new is learning the right search terms! It took me forever when I started with InfoPath to find what I needed because I didn't know what I needed was called. :)

    Hilary Stoupa

  • 03-12-2017 09:18 PM In reply to

    Re: Alert Message if more or less than 100%

     Dear Hilary,

    thanks a lot for your help, it works just perfect and without any problems :-)

    But the process to make that happen is still not clear to me yet. I spent more than 4 hours time to figure out what you have done, without any luck.

    1. I can see the following settings at the city control properties :  

     

    2. When I check the Data Filer than I can see the following : Country is equal to Country

     

    3.  But when I copy and paste the Entries field, the following data will show up, which more than just country equal to country :

    /data-set/record/City[../Country = xdXDocument:get-DOM()/dfs:myFields/dfs:dataFields/my:SharePointListItem_RW/my:Country]


     

    How did you enter those data ? I did try many times to reproduce this step and had never luck so far.

    Thanks a lot and best regards,

    FlyingTiger 

    PS OKAY - SOLVED :-)

    I was able to solve the problem by using the field from the MAIN connection instead of the secondary one :-)

    Thank you Hilary !!!!!!!!!!!!!!!!!!!!! 

  • 03-13-2017 07:48 AM In reply to

    Re: Alert Message if more or less than 100%

    Oh, hooray! I hadn't seen your edit, and I put together a screenshot for you - so I'll attach that anyway. Great job figuring it out! :)
    Hilary Stoupa

  • 03-13-2017 07:12 PM In reply to

    Re: Alert Message if more or less than 100%

    Oh, sorry to give you the trouble again for making screenshots ;-)

    Hilary, thanks a lot for your time and outstanding support. Much appreciated and without your help, I would never be able to finish my task. 

    Let's see, I might start soon with another project like for example : InfoPath with Nintex to do Annual Leave Tool ;-)

     Thank you Hilary.

    Best regards,

    FlyingTiger 

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