Function question- with Data Connection to Sharepoint List - InfoPath Dev
in

InfoPath Dev

Function question- with Data Connection to Sharepoint List

Last post 08-18-2014 12:39 AM by donstephen. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 08-15-2014 08:37 AM

    Function question- with Data Connection to Sharepoint List

    In my InfoPath form, I have a field labeled "ID number" where users have to input their number into. My Data Connection is set up to submit the form to a document library on a SharePoint site. I provided the link to the Document Library and for the File name- I inserted a formula to pull the "ID Number" field from the form.

    The number displays on the SharePoint site but my challenge is, I want to truncate that ID number so users of the library will only see the last 4 digits.

    Is there a way to insert a formula to include the "ID Number" field and have it truncate the last 4 digits in a Data Connection?

    I tried this formula but it did not work- Right(IDNumber,4)

  • 08-18-2014 12:39 AM In reply to

    Re: Function question- with Data Connection to Sharepoint List

    Hi Rauserka,

    For cases like this, I normally use a substring function in order to get a portion of a text string. Could you try using the formula below?

    substring(IDNumber, string-length(IDNumber) - 3, 4)

    IDNumber is for the IDNumber field you wish to truncate. The next value string-length(IDNumber) - 3 returns the number of characters the IDNumber contains and subtracts 3 from that number so that the returned value for the whole formula starts at the last four digits (e.g IDNumber: 123456789 will start from 6, which is the starting point for the last four digits), and the last value 4 determines how may characters re returned. Hope this helps.

    Don Stephen Lambatin / Support Engineer
    Qdabra Software
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.