Using GetAttachmentAttribute in File attachment with repeating section - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Using GetAttachmentAttribute in File attachment with repeating section

Last post 08-20-2014 03:50 AM by Tosha Mehta. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 07-16-2014 10:04 PM

    Using GetAttachmentAttribute in File attachment with repeating section

    Hi, i am trying to use GetAttachmentAttribute for fetching the file name from a File attachment with a repeating section. I am aware that if i am using a repeating section then i will have to provide something like a counter for each section which will bring me the section number and for this purpose i am storing the count(preceding-sibling::*) + 1 value in a field and i pass the GetAttachmentAttribute as concat("GetAttachmentAttribute /xpath=/my:myFields/my:AttachmentGroup/my:AttachmentSection[", rowNumber, "]/my:Attachment /attr=Name") where rowNumber is a field containing count(preceding-sibling::*) + 1 value and AttachmentSection is the repeating section. After fetching the name for my attachment, i pass the result in the 'SaveToSharePoint' command as i want to rename the attachment being saved in my library. The problem that i face is that if i upload two files with different extensions then the GetAttachmentAttribute picks up the dame name for both of them and gives the same name for both the files and different extensions. Can someone help me in understanding what am i doing wrong here? is anything wrong with my syntax for 'GetAttachmentAttribute '? Any help is appreciated Thanks in advance
  • 07-20-2014 09:44 PM In reply to

    Re: Using GetAttachmentAttribute in File attachment with repeating section

    Hi Tosha,

    I have sent a sample form to your email and also attaching a sample here regarding this issue.

    concat("GetAttachmentAttribute /xpath=/my:myFields/my:Attachments/my:Attachment[", count(preceding-sibling::Attachment) + 1, "]/my:File /attr=Name")

    I believe that the sample formula above is correct, but I'm not quite sure why it is not working for you. If it is not the command syntax, then I am guessing that the form's arrangement is causing the issue. Please check the form I am attaching for your reference. Hope this helps.



    Don Stephen Lambatin / Support Engineer
    Qdabra Software
  • 08-20-2014 03:50 AM In reply to

    Re: Using GetAttachmentAttribute in File attachment with repeating section

    Thanks a lot don. That did help :)
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.