Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Søren Kottal 713 posts 4571 karma points MVP 7x c-trib
    Aug 05, 2015 @ 09:00
    Søren Kottal
    0

    Save to input specific node using xpath in contour

    Is it possible to make an xpath to save a new document in a node relative to one of the form fields?

    Like //Submissions/Category[name=$formfield]

  • Comment author was deleted

    Aug 05, 2015 @ 09:30

    Hmm not sure will have to check the code for that but in case it works it should be the with the following syntax //Submissions/Category[name=[$formfield]]

    so[$formfield] will be replaced

  • Chriztian Steinmeier 2800 posts 8791 karma points MVP 9x admin c-trib
    Aug 10, 2015 @ 09:09
    Chriztian Steinmeier
    0

    A quick "outside" observation: Using square-brackets as part of the replacement could potentially be a problem, since the XPath itself will be invalid...

    Any specific reason for having to use them like that?

    /Chriztian

  • Comment author was deleted

    Aug 11, 2015 @ 08:02

    @Chriztian, well the replacement will happen on the string before it is used as an xpath statement

  • Chriztian Steinmeier 2800 posts 8791 karma points MVP 9x admin c-trib
    Aug 11, 2015 @ 08:14
    Chriztian Steinmeier
    0

    hehe - I'm totally aware of that, didn't mean to sound as if I didn't get it :)

    It's just that in other places where XPath is used (e.g. the MNTP) they're just "magic variables" – here, you also need to wrap them in square brackets, which has their own meaning in XPath - so can be potentially confusing if you've started to get familiar with XPath for some of the places it can be used...

    Really, I was probably more concerned about the consistency-issue than the XPath-issue here.

    /Chriztian

  • Comment author was deleted

    Aug 05, 2015 @ 09:32

    Currently it won't work but it's an easy update if you are up for upgrading to a nightly?

  • Comment author was deleted

    Aug 05, 2015 @ 09:39

    Just made the changes, you can upgrade to 3.0.29 WIP build that available here http://nightly.umbraco.org/Umbraco%20Contour/3.0/UmbracoForms.files.3.0.29.WIP-Build.50.zip

  • Søren Kottal 713 posts 4571 karma points MVP 7x c-trib
    Aug 06, 2015 @ 13:05
    Søren Kottal
    0

    Thanks, I will look into that!

  • Comment author was deleted

    Aug 10, 2015 @ 08:32

    So did that do the trick?

  • Søren Kottal 713 posts 4571 karma points MVP 7x c-trib
    Aug 19, 2015 @ 06:25
    Søren Kottal
    0

    Unfortunately, I haven't been able to upgrade yet.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies