Copied to clipboard

Flag this post as spam?

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


  • Jonas Nilsson 137 posts 260 karma points
    Aug 05, 2014 @ 11:33
    Jonas Nilsson
    0

    GetApprovedRecordsFromFormOnPage + Razor

    Hi!

    How can I get a RecordField value when iterating records like this? (Error when accessing this field)

    @foreach (dynamic record in Library.GetApprovedRecordsFromFormOnPage(@CurrentPage.Id, "f0170d32-0c46-4648-a0a4-105ca5c26c0e").OrderBy("Created"))

    {
    @record.Comment
    }

    The example commes from this page:
    http://our.umbraco.org/projects/umbraco-pro/contour/documentation/developer/Working-with-Contour-data-in-Razor/

     

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Aug 05, 2014 @ 12:56
    Tim Geyssens
    0

    Hey Jonas,

     

    What is the error you are getting?

  • Jonas Nilsson 137 posts 260 karma points
    Aug 05, 2014 @ 13:08
    Jonas Nilsson
    0

    Solved, had mixed up the form id's.

    The example works fine when using the corrent field names...

    /Jonas

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Aug 05, 2014 @ 14:02
    Tim Geyssens
    0

    Ok glad it's working :)

  • 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