Text Box with Only Positive Integers Allowed error - InfoPath Dev
in

InfoPath Dev

Text Box with Only Positive Integers Allowed error

Last post 01-24-2018 10:56 AM by sajan. 21 replies.
Page 1 of 2 (22 items) 1 2 Next >
Sort Posts: Previous Next
  • 07-16-2012 02:35 PM

    Text Box with Only Positive Integers Allowed error

    I have a cascading list that has been created utilizing 7 individual custom lists from SP 2010 with various look-up references. The resulting list is established to show different segments of a job posting: Title, Summary, Responsibilities, Knowledge/Skills, Compensation, About, and Location. All of the lists, except Title and location, are feeding off the Title table to use a look-up value to correlate the job Title with all of the other segments of the job posting. Essentially the goal is to select the Job Title and have all other segments auto populate with the correct information. Sad to say this works in InfoPath 2010, almost. I get the nice little error: Only Positive Integers Allowed. The setup for the form is as follows: Title = Drop Down list with reference back to the SP list, Value is set to ID and Display Name is set to Title. (no error on this line) Summary = Text Box with a value of the following: xdXDocument:GetDOM("Career_Summary")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Summary_Description[xdXDocument:get-DOM()/dfs:myFields/dfs:dataFields/my:SharePointListItem_RW/my:Career_x0020_Title = ../d:Title_Lookup] (I have an error on this line) Responsibilities, Knowledge and Skills, Compensation, and About are also setup with Text Boxes with the same error. Location is a drop down list, no errors. The reason I'm using a text box is to show the multiple lines of text that exist in each of the individual lists. For example: Job title = Intern. This sets the list to automatically establish the values for: Summary (multiple lines over 1500 characters), Responsibilities (over 1500 characters), K&S (over 1500 characters), Compensation (over 1500 characters), About (around 1500 characters), Location (less than 100 characters). I've dug through the postings on here to deal with the error but none have resulted in clearing this annoying problem. I had the same issue with the drop down lists and cleared that using the recommendations of unchecking "Require that this column contain information". I suspect that I need to change the Default Value of the text box to reference the ID while building something else in here to actually display the text correctly. This is where I'm stuck and could use help.
  • 07-16-2012 03:21 PM In reply to

    Re: Text Box with Only Positive Integers Allowed error

    Hi - my apologies, I know you are trying to be thorough describing your issue, but I'm sort of confused. Where you get the error about positive integers? Is it a validation error?

    Is this a SharePoint list form?

    I think what is happening, if so, is that you are setting your fields that are lookups to a title value instead of the ID value - the lookup will probably want the SharePoint list item ID.

    So, given just the sample of Summary -

    xdXDocument:GetDOM("Career_Summary")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Summary_Description[xdXDocument:get-DOM()/dfs:myFields/dfs:dataFields/my:SharePointListItem_RW/my:Career_x0020_Title = ../d:Title_Lookup]

    I'm wondering if you want the summary's ID field rather than the description.

     

    Hilary Stoupa

  • 07-17-2012 05:54 AM In reply to

    Re: Text Box with Only Positive Integers Allowed error

    Good morning, yes this is a SharePoint list that is pulling the pieces together. Once I changed the InfoPath form for each one of the sections over to the text box, this is when the errors started occurring. In InforPath, the formula checks out good, so I am assuming it is a validation error when it tries to write back to the list. If this is the case, I agree I need to pull the ID over as this clears the error, however I end up with an ID in the text box instead of the multiple lines of text I'm expecting. How do i write the formula to choose the ID, not display the ID and instead display the description? The formula I included in the original post does what I want it to, just has the positive integer issue.
  • 07-17-2012 01:01 PM In reply to

    Re: Text Box with Only Positive Integers Allowed error

    I've been playing with this most of the day, with no luck in getting to the final result without the integer error squawking at me. If I set the "Value" in Text Box Properties under Default Value to the ID, error goes away. I'm still left with a number displaying in the form, which doesn't accomplish the goal. When I add an action to display the text instead of the ID, the error comes back. I can't believe InfoPath is this hard to get it to do a simple lookup, auto fill the data and not freak out.
  • 07-17-2012 02:43 PM In reply to

    Re: Text Box with Only Positive Integers Allowed error

    Okay, but you see, the thing is the underlying data type is an integer - that's why if you set the value to the ID, the error goes away.

    Instead of displaying the form field in the form, you could use a calculated value that shows the data you want based on the ID in the field. Attach your template under the Options tab in a reply if you'd like me to show you what I mean. :-)

    Hilary Stoupa

  • 07-17-2012 02:55 PM In reply to

    Re: Text Box with Only Positive Integers Allowed error

    I just discovered that method from this thread: http://www.infopathdev.com/forums/t/12113.aspx?PageIndex=2 only problem now: another error! "binding a non-repeating control to a repeating field or group is not supported in SharePoint list forms." So If I do bind this to a repeating control, I get the error with "Only Positive Integers Allowed". I do like the format of the calculated value best though, and would like to make this the solution. the file is attached for review.
  • 07-17-2012 03:11 PM In reply to

    Re: Text Box with Only Positive Integers Allowed error

    So, I've put a couple of calculated values on the form - at the bottom, under the word "Test" - can you see if they return the info you want to display? I think your error may be because of the default value you are using. I think I'd suggest that you add rules to the Career Title field, and set the values of the other lookups to the correct ID for the lookup. And then not display those fields on the form, but use expression boxes to display the correct info - either based on the Title Lookup (which is what I tried in the calc'd values I added) or based on the ID you've set the field to.

    Hilary Stoupa

  • 07-17-2012 03:16 PM In reply to

    Re: Text Box with Only Positive Integers Allowed error

    the file will not open for me. Error says it has restricted read permissions on it. never mind, got it opened.
  • 07-17-2012 03:25 PM In reply to

    Re: Text Box with Only Positive Integers Allowed error

    You rock! Yes this is what I was looking for! Thank you so much. The Summary Description field is doing what it needs to. I'll change out the other values in the form and I should be good to go. Thank you again for helping me out on this!
  • 07-17-2012 03:28 PM In reply to

    Re: Text Box with Only Positive Integers Allowed error

    You bet - glad that was what you needed! :-)

    Hilary Stoupa

  • 07-17-2012 03:36 PM In reply to

    Re: Text Box with Only Positive Integers Allowed error

    Arghhhh! still back to the positive integer error. This time it is not highlighting the text area but comes up in a different error message box when you submit the form.
  • 07-17-2012 03:52 PM In reply to

    Re: Text Box with Only Positive Integers Allowed error

    You had a lot of default values - drag the main data source onto your form so you can see what fields are actually being set to (change the data source task pane to the advance view to make it easier for yourself). Again, the error is occurring (most likely) because you have set one of these lookup fields to a text string instead of a list item ID.

    Hilary Stoupa

  • 07-18-2012 10:27 AM In reply to

    Re: Text Box with Only Positive Integers Allowed error

    What a pain in the cranium! Solution, Finally! Step 1 - Add multiline text columns in the SharePoint list. I named mine close to the Lookup Column field. Ex. Summary (multiline text column) and LK_Summary (Lookup Summary column). Step 2 – Open InfoPath form to edit. Step 3 – If the new multiline text columns did not come over already on the form, simply add them to your form by dragging them over from the Fields (should show up on the right side of the InfoPath program). Step 4 – With the Text box selected in the form, go to the Fields right click on the Lookup Field that correlates to your Multiline Text box (Summary and LK_Summary for mine). Open Drop-Down List Properties. This will add a new box under the text box in the form. Step 5 – With the new box added under the text box in the form, right click on the new box and open the Drop-Down List Box Properties. Step 6 – Connect your Data Source Step 7 – Make sure your Entries field is correct. Step 8 – Change the Value to d:ID Step 9 – Change Display name: d:ID Step 10 – Apply changes and hit OK to exit Step 11 – Go up to your Multiline Text box, right click and open Text Box Properties (or Rich Text Box Properties). Step 12 – Click on the fx (function) key to add a value. Step 13 - Select the Lookup Field for the data source at the secondary level. This is the SharePoint list that is driving the lookup values for the column. In my case it was Summary_Description as this is the original name of the custom list in SharePoint. Step 14 – Add any filters to auto-populate the field. In my case I am filtering based on a Title with a lookup to that same Title to filter content in the Summary Description table. Step 15 – Click OK to save and close out of all open boxes. Step 16 – Remove the Lookup box under your multiline text box. Say what? Yes you can remove the box and InfoPath will keep the connections that you built and it seems to work fine. Step 17 – Preview the form to make sure it works. Step 18 – Publish the form and take the rest of the day off!
  • 03-27-2013 11:24 AM In reply to

    Re: Text Box with Only Positive Integers Allowed error

    Would you be willing to post the formulas you used to calculate the value? I spent the majority of my day yesterday trying anything I could think of, including trying to calculate the value and still only managed to pull in the ID.
    Hilary Stoupa:

    Okay, but you see, the thing is the underlying data type is an integer - that's why if you set the value to the ID, the error goes away.

    Instead of displaying the form field in the form, you could use a calculated value that shows the data you want based on the ID in the field. Attach your template under the Options tab in a reply if you'd like me to show you what I mean. :-)

  • 03-27-2013 11:53 AM In reply to

    Re: Text Box with Only Positive Integers Allowed error

     There are some sample templates in this thread - try saving one of them locally (right click - save as) and then from the local copy, right click and select design to open - see if that helps. If not, let me know & I'll review the thread (it has been a while & it is not fresh in my mind...)

    Hilary Stoupa

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