Padding text box issue - InfoPath Dev
in

InfoPath Dev

Padding text box issue

Last post 12-04-2007 07:34 AM by Ed Rodman. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 12-03-2007 11:33 AM

    Padding text box issue

    Clay,

    Regarding my padding issue...If I use the following code as my filter....@RELM_NME[concat(txt_RelmNumber, "  ")] I get the first value of the recordset. If I change it to @RELM_NME[concat(txt_RelmNumber, "  ")= @RELM_ID]   it returns nothing. Can you see what I am missing?

    I know the condition is working, so I know control is getting into the routine. If I use  ....@RELM_NME[concat(txt_RelmNumber, "  ") .. It returns the first account name of the first record in the query,,,,otherwise it returns nothing. If you were writing it yourself how would you code it?

     

    ed

     

     

     

    Thanks Ed

  • 12-03-2007 12:36 PM In reply to

    OK How would I do it....

    I would move it to SQL

    I would create an actual account numbering scheme

    Along those lines I had a thought.

    Why don't you use a drop down with the account name?  You can enter a letter or number to jump to that part of the list.  That may be easier?

    Another Idea would be to use a list box or drop down.

    Have a field for the user to enter

    Then have a list box control.

    Set it up to show all values which start with what the user entered.  Since you have the space problem it might be easier to use the starts with instead of equal.  I am not sure how many permutations you have such as AB1 and AB1B2 but I am guessing it should not be too many.

    I thought you had it working for some values. Another option is add another field to your form (adjustedNumber) which you set with the concatenation to pad the spaces and then you is in your comparison. [RelmID = adjustedNumber]

     

  • 12-03-2007 12:49 PM In reply to

    Hi

    We originally had it working in a drop down. The problem is that drop down contains 20,000 accounts. Therefore the users would have to press "N" to get to the first N record -- but would still have to navigate to the record. We felt it would be easier to simply enter it. The lookup works perfectly when the value entered is 5 characters long (same size as the underlying table field).

    If they have an account ID that is 3 characters long, it will work ONLY if the enter the space bar 2 times....and 1 time after entering a 4 chararacter value.

    I will try your adjusted number idea.

     

    Thanks

    Ed

  • 12-03-2007 12:56 PM In reply to

    I thought of a better idea.

    Have a rule on your accountnumber field that they enter into which sets itself with the space padding.

    Then have a rule afterwards which does the lookup for the account name.

    Same result but simpler.

    SO pad first then do the comparison, if adding the spaces manually always works then this should fix.

  • 12-04-2007 06:23 AM In reply to

    Almost there!!!!!

    Clay, your last idea worked!!!! Any account that contains 3 alpha characters or 4 alpha characters only finally worked. There is one instance where the rule(s) don't work....We have some accountID's that are in the form ....JA1, E7T, H53, 131 ... Basically on the three character accountID's that contain a numeric, that the lookup's don't work.....Thats really strange... We don't have any AccountID's of the length 4 containing atleast 1 numeric character, but the 5 position accountID's containing a number ....it works fine.

    So, does this make sense, and why would Infopath work this way????? --- could it by my condition, I am looking for 3 alpha's....

  • 12-04-2007 07:34 AM In reply to

    GOT IT!

    It was my condition, I was matching the pattern of 3 alphas....when I changed it to match on any 3 characters, it worked. I realized it when I sent my last posting, Thank you so so much for helping me work thru this.....I gotta say, I learned alot,. Your help was immeasurable.

    Now, my question, is where does one find examples like this. I dont see it in any book. With Access VB, SQL there are examples that one can learn from...I am finding the desert bare when it comes to Infopath examples. These rules are quite powerful....

     

    AGAIN THANK YOU FOR YOUR HELP.

     

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