Dropdown Lists - InfoPath Dev
in

InfoPath Dev

Dropdown Lists

Last post 11-28-2006 01:59 AM by Stavi. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 11-27-2006 01:39 AM

    Dropdown Lists

    How do I dispaly the maximum Value in a dropdown list box.

    The dropdown list box receives data from my sharepoint Libary (Integers). Through a data connection. I want to be able to display the maximum integer that is returned as the default.

    Can anyone help?

    Michael
  • 11-27-2006 04:01 AM In reply to

    • Stavi
    • Top 100 Contributor
    • Joined on 12-13-2005
    • Posts 95
    After you have setup the dropdown list double click the field from your datasource to get it properties (the properties of the field not the properties of the dropdown list)

    You can then enter a default value, use the max function and choose the same field you got list from
  • 11-27-2006 04:38 AM In reply to

    This Does not work?
  • 11-27-2006 05:41 AM In reply to

    • Stavi
    • Top 100 Contributor
    • Joined on 12-13-2005
    • Posts 95
    Where is the drop down list getting it numbers from?

    I just tested it using a table from my database and it returned highest number
  • 11-27-2006 10:44 AM In reply to

    Why I try to so this I find that the properties of the field are read only.
  • 11-27-2006 08:09 PM In reply to

    Try this: set the source of the drop down to the SharePoint Data Source. Click on the XPath button next to the Entries field, then on Filter Data. Click Add, Then select The Expression. Add the following expression, inserting your field and attribute names as indicated: not(. <= ../preceding-sibling::<insertSharePointFormLibraryName>/@<insertAttributeNameForFormNumber>) and not(. <= ../following-sibling::<insertSharePointFormLibraryName>/@<insertAttributeNameForFormNumber>)

    This should filter all of the items out of the drop down and leave you with only the max value.

    That's all I can think of without writing a little code.
  • 11-28-2006 01:59 AM In reply to

    • Stavi
    • Top 100 Contributor
    • Joined on 12-13-2005
    • Posts 95
    He's not trying to limit it to the max value, only default to the max value and still have the option of selecting a lower value.

    the max function does work on the default value for a drop down. I'm guessing that the source of the drop down are not numbers or numbers in a text field.

    I have never pulled data from a sharepint site but I'm guessing the properties from these fields would be read only.

    Assuming the drop down is bound to one your own fields then the properties would not be read only
Page 1 of 1 (7 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.