Copied to clipboard

Flag this post as spam?

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


  • Carlos Mosqueda 240 posts 431 karma points
    Mar 27, 2015 @ 22:08
    Carlos Mosqueda
    0

    Getting data from custom table and using it

    We have a table we are getting data from a service and populating a dropdown list in our BackOffice for our content editors to use, using Angular to populate the dropdown.  

    We then save the selected value to a Custom Table in the same DB as Umbraco.  We are able to get the ng-selected value back from our Custom Table, but what we need now is the ability to use the data.  

    We have a C# controller that is generating an XML feed and outputting it using the Umbraco WebAPI, we can't seem to push our data from our custom dropdown list out to the XML feed from the selected value. We are able to get the a value if the Document Type property is of a type Text String, but when we try to output out data, we don't get out value out. 

    I guess my question is, how does Umbraco use the data to set the value and send it to the WebAPI.

    Here is just a tiny bit of code we are using to try to push out our content.  Like I said, if the property is a Text String it works, but if it is from our custom dropdown list, the property is blank.  It is like Umbraco doesn't use our value and we are trying to figure out how to get Umbraco to use our Value to pass it to our feed.

    Any pointers are appreciated. 

     // figure out if kioskId is valid
                    var kioskNodeId = help.TypedContent(_kioskNodeTreeId)
                        .Children
                        .FirstOrDefault(d => d.GetPropertyValue("kioskNodeName") == kioskId)
                        .Id;
                    nodeName = help.TypedContent(kioskNodeId).GetPropertyValue("kioskNodeName");
  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    Mar 31, 2015 @ 10:02
    Dave Woestenborghs
    0

    Hi Carlos,

    Instead of creating your own property editor, may you can have a look at nuPickers

    They support SQL and Dotnet datasources. More information about that can be found on their wiki:

    https://github.com/uComponents/nuPickers/wiki/Data-Source-Sql
    https://github.com/uComponents/nuPickers/wiki/Data-Source-DotNet

    Dave 

Please Sign in or register to post replies

Write your reply to:

Draft