Linking a SaveToSharePoint file - InfoPath Dev
in

InfoPath Dev

Linking a SaveToSharePoint file

Last post 07-23-2012 10:53 AM by hdumont. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 07-23-2012 08:44 AM

    Linking a SaveToSharePoint file

    Hello All!

    First I'd like to say, lurking around this forum has been an absolute dream for what I've been trying to accomplish with this form.

    My goal:  I have successfully used the SaveToSharePoint command to upload a file to sharepoint.  It then links the file, which is great.  It's part of a repeating table, which is also working fine.  What I need is to create a button that essentially says "Approve" and copies the link for the linked file in my table (it copies the top one, obviously, which is fine...  I'd like it to be the bottom row, but can live with it being the top one) to another section of the form called Final Document.  Obviously I would like the document link in the Final section to be hidden until the Approve button is clicked.

    I have tried

       - setting up a hyperlink as directed in the SaveToSharePoint help guides, but formatting rules are not an option for hyperlinks.

        - using the Approve button to trigger setting a rich text field value to be @qRulesLink.  Result:  the plain text URL for the saved document, no matter what I change the settings to.  I even tried concat-ing a space afterwords (since if you put the cursor after the URL and hit space, it creates a hyperlink) and that didn't work.

        - created a button labeled "View Final Document" and tried to set an onclick action to set the field's value Command to OpenUrlInBrowser /url=@qRulesLink.  Error in the formula.  Even tried OpenUrlInBrowser /url=(substring-after(@qRulesLink, "http")) and OpenUrlInBrowser /url=substring-after(@qRulesLink, "http"), both errors in formula.

        - created a section, made it a hyperlink called View Final Document - works but I can't seem to hide it with formatting no matter what the conditions.  I've changed the condition many many times, based it on several fields throughout my form, and it never hides.

    I know I can hide and format a button, so I'd be really happy if once I clicked upload on the SaveToSharePoint command, the URL to the newly saved document was actually a button.  I think I could make this solution work if I could just get the hyperlink to be a button.  I'm also open of course to other solutions. 

    Any thoughts?  Suggestions? 

     

  • 07-23-2012 10:43 AM In reply to

    Re: Linking a SaveToSharePoint file

    Hi!

    You've listed four ideas, so let me share my thoughts on each:

    1. I would set up a hyperlink but within a section, and I would then add conditional formatting to the section itself. (Which might be what you did for idea #4, not sure).

    2. I don't think this would work.

    3. This should work. Is the command returning an error, or is InfoPath not accepting the rule? I think you would need to click fx first, then enter concat("OpenUrlInBrowser /url=",@qRulesLink). Can you try that?

    4. See #1. If there's a hyperlink within a section, conditional formatting should allow to hide/show the section.

    Good luck!

     

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 07-23-2012 10:53 AM In reply to

    Re: Linking a SaveToSharePoint file

     Definitely could not get hide/show to work on the hyperlink within a section (adding the conditional formatting to the section itself of course)...  It was just always there regardless of the conditions.

    HOWEVER..  I added my 'View Final" button, put in the formula concat("OpenUrlInBrowser /url=",@qRulesLink) - WORKED LIKE A DREAM!  Took off the formatting of the button - no shading, no outline, make it blue, underline and wah-lah!  A fake link :)  The conditional formatting on the button works as expected. 

    You are a genius!  Thank you SO much!! 

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