Stumped on writing a formula - InfoPath Dev
in

InfoPath Dev

Stumped on writing a formula

Last post 08-06-2012 10:29 AM by eastmarw. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 06-21-2012 09:25 AM

    • eastmarw
    • Not Ranked
      Male
    • Joined on 06-28-2010
    • Grand Rapids, MI
    • Posts 5

    Stumped on writing a formula

    I have a dropdown control that displays a list of Offices by their three letter abbreviation.  Once choosen it puts the 'Value" which is their address in a text field.  Now I need another Text field to display a certain account reference which is text, when they choose thier specific Office Abbreviation.  The formula needs to be if you choose "CIM" (that isn't the value just it's display name), then you place "BDO SAR 13" in the text box.  I am no programmer and very new to Infopath.

    Dream On Alice! This Ain't Wonderland.
  • 06-21-2012 09:52 AM In reply to

    Re: Stumped on writing a formula

    Hi - what is the data source for the drop down list? Does the drop down use a secondary data source for it's values? Or have they been manually entered into the control?

    Hilary Stoupa

  • 06-21-2012 11:57 AM In reply to

    • eastmarw
    • Not Ranked
      Male
    • Joined on 06-28-2010
    • Grand Rapids, MI
    • Posts 5

    Re: Stumped on writing a formula

    Hi Hilary, they have been manually entered into the control.  I was thinking that it might be easier if I were to just tack this text onto the end of each address since each office has a different agreement number with HP.

    Dream On Alice! This Ain't Wonderland.
  • 06-21-2012 04:09 PM In reply to

    Re: Stumped on writing a formula

    If the values are manually entered into the control, there isn't going to be a rule based way to get the "display" value, I'm afraid. You may just want to add it to the end of each address - separated with a somewhat unique character, so you can use substring-after to get the information on its own if needed. Or you could use an XML file for your secondary data source - let me know if you'd like a sample of that and I'll put one together. :-)

    Hilary Stoupa

  • 06-26-2012 06:26 AM In reply to

    • eastmarw
    • Not Ranked
      Male
    • Joined on 06-28-2010
    • Grand Rapids, MI
    • Posts 5

    Re: Stumped on writing a formula

    Hilary,  Thank you for your help.  I am not opposed to using an XML file for populating the drop down box to plug in the address and HP Contract number.  I have viewed XML and altered some XML files but never created some from scratch.  The data source for locatons is currently called "location" which displays one thing but the value is another.  i.e. Display "CIM" and Value is "770 Kenmoor AVE SE, Suite 300, Grand Rapids, MI 49546" and this choice then populates a field called "address" with the offices physical address.  What I need to do is associate "CIM" or the address with another field within the form called "Support Account Reference" (not created yet), that will populate the office's SAR number onto the form that is emailed to HP for removing/addeding or changing our maintenance support on that particular server.

     I can se on the "List box entries" tha tI can choose other look up values so I assume I am changing this area and pointing it to the xml file.  This is a published sharepoint form so I am not sure but I believe that the XML file would have to be stored in the sharepoint infopath site where new forms are created.

     Clueless :) but getting better.

    Dream On Alice! This Ain't Wonderland.
  • 06-26-2012 03:02 PM In reply to

    Re: Stumped on writing a formula

    I've attached a sample for you to take a look at. Right click the link in the heading of this post. Save the file locally. Right click and select "Design" to open in design mode from your saved location. Then you can preview, take a look at the logic, etc. Let me know if you have questions.

    Hilary Stoupa

  • 08-06-2012 09:38 AM In reply to

    • eastmarw
    • Not Ranked
      Male
    • Joined on 06-28-2010
    • Grand Rapids, MI
    • Posts 5

    Re: Stumped on writing a formula

    Thanks Hilary!

     I am finally able to work on this and it works great.  Now one other question on this.  When the user makes the choice it will diplay a popup box stating what he/she choose.  I will hear the gripes that they have to hit OK :).

    Dream On Alice! This Ain't Wonderland.
  • 08-06-2012 10:08 AM In reply to

    Re: Stumped on writing a formula

    I'm not sure if you are saying you want a dialog box message? Or saying you don't? So I looked at the sample form again, it doesn't contain one, so I am guessing you do want one? At any rate, that's what I added to this sample with a rule on field1.

    Hilary Stoupa

  • 08-06-2012 10:29 AM In reply to

    • eastmarw
    • Not Ranked
      Male
    • Joined on 06-28-2010
    • Grand Rapids, MI
    • Posts 5

    Re: Stumped on writing a formula

    This popup appears to be just part of the preview.  Once published, I do not get this box.  Thanks Hilary!

    Dream On Alice! This Ain't Wonderland.
Page 1 of 1 (9 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.