Trimming Long File Name - InfoPath Dev
in

InfoPath Dev

Trimming Long File Name

Last post 11-21-2014 08:49 AM by Ravik. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 11-14-2014 05:54 AM

    • Ravik
    • Top 500 Contributor
      Male
    • Joined on 01-25-2013
    • Aberdeen(Scotland)
    • Posts 33

    Trimming Long File Name

    Hi All, Is there a way to restrict or trim the attachment file if it exceeds more than 100 or 128 character? I already run a decoder in my code which eliminates special characters, but if the file name is longer than 128 characters and does not have any special characters. Based on the above scenario, how can i trim the file name? Any help will be much appreciated. Regards, Ravi
  • 11-15-2014 09:03 PM In reply to

    Re: Trimming Long File Name

    Hi Ravi,

    It's easy to trim field lengths. Just add a rule that sets the field to the substring of itself and use first of 0 and last of 128 to get the first 128.

    Unfortunately, for file attachment names, they are not stored in fields, so you have to write some code. Our qRules plugin let's you manipulate file attachments and their names, but we don't have time to respond here to every code request.

    Thanks for your understanding.  

    Patrick Halstead
    Project Manager at Qdabra
  • 11-21-2014 08:49 AM In reply to

    • Ravik
    • Top 500 Contributor
      Male
    • Joined on 01-25-2013
    • Aberdeen(Scotland)
    • Posts 33

    Re: Trimming Long File Name

    I totally understand Patrick. Thanks for your time. Regards, Ravi
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.