I'm using a custom datatype who retrieve data from a custom table using webcontrol wrapper and fill a dropdownlist. All is working when I select a value and save a page.
When I navigate a page, I see the umbraco:field associate to my control as a ID of the table, but I want to show the value. How can I do it?
I've passed hours looking for a solution, but without lucky.
This is because the value is stored as a single string and it will only store the value beause you've assigned the value.You can solve this issue in several ways.
1. Store the text value instead of the id value
2. Store both Id and Text value in an xml format and use a macro to retrieve the text value.
I think the better ways is to retrieve the text from my table by the id stored in the document with a macro, but I don't know how to write a macro to do it.
Would love to, but kinda in a hurry. I suggest you checkout the free video's regarding macro's this will help you withy the concept and if you are a .net developer yous hould be fine.
Custom Datatype question
Hello,
I'm using a custom datatype who retrieve data from a custom table using webcontrol wrapper and fill a dropdownlist. All is working when I select a value and save a page.
When I navigate a page, I see the umbraco:field associate to my control as a ID of the table, but I want to show the value. How can I do it?
I've passed hours looking for a solution, but without lucky.
Thanks in advance.
Hi,
This is because the value is stored as a single string and it will only store the value beause you've assigned the value.You can solve this issue in several ways.
1. Store the text value instead of the id value
2. Store both Id and Text value in an xml format and use a macro to retrieve the text value.
Cheers,
Richard
Thanks for the answer Richard.
I think the better ways is to retrieve the text from my table by the id stored in the document with a macro, but I don't know how to write a macro to do it.
Can you help me doing it?
Thanks.
Would love to, but kinda in a hurry. I suggest you checkout the free video's regarding macro's this will help you withy the concept and if you are a .net developer yous hould be fine.
Cheers,
Richard
I am looking the videos. Not only the free one. I've a subscription to Umbraco TV, but can't find what I'm looking for.
is working on a reply...