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");
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.
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
is working on a reply...