Hi,
I'm also curious, and would like a simple solution to this, instead of having to create a custom repository (only solution i can think of) and modify the GetPaged() method for every table I have.
Hey, you'll have to hook into the event model and write the select query... there should be some examples here on the forum, I'll see what I can find...
Hi Tim,
Thanks for the speedy reply.
I've checked the example, and implemented the code in my project.
Due to being on an older Umbraco, and MVC project, I had to reference a different object, as seen in my code;
Every time I click to open a UI-O-Matic entity, my code hits the if loop, and enters when the correct table is clicked, and my query works (tested resulting Query in appropriate DBMS).
However, my FK isn't being replaced with the field I'd like to return instead, which would be langauges.Name instead of propertytypelisttranslations.LanguageId
Do I have to add something to the resulting POCO, but keep it empty?
List name field of reference table instead of Id in Ui-O-Matic table
Hi,
I am using Ui-O-Matic. It is working really nice. But problem is in listing records of table.
I am able to list added records of table. But if table has any reference table. Then it will show you stored Id of reference table.
But I want to list name field of reference table instead of Id. To make it more readable.
Please see attached screenshot here. Please help me to get expected result.
Hi, I'm also curious, and would like a simple solution to this, instead of having to create a custom repository (only solution i can think of) and modify the GetPaged() method for every table I have.
Can anyone help, or shed some light on this?
Hey, you'll have to hook into the event model and write the select query... there should be some examples here on the forum, I'll see what I can find...
Check out this example
https://github.com/TimGeyssens/UIOMatic/blob/master/src/Example/Startup.cs#L28
https://github.com/TimGeyssens/UIOMatic/blob/master/src/Example/Startup.cs#L49
Hi Tim, Thanks for the speedy reply. I've checked the example, and implemented the code in my project. Due to being on an older Umbraco, and MVC project, I had to reference a different object, as seen in my code;
Every time I click to open a UI-O-Matic entity, my code hits the if loop, and enters when the correct table is clicked, and my query works (tested resulting Query in appropriate DBMS).
However, my FK isn't being replaced with the field I'd like to return instead, which would be langauges.Name instead of propertytypelisttranslations.LanguageId
Do I have to add something to the resulting POCO, but keep it empty?
Yeah you need update your poco so it includes a name property that can be populated
and mark it with
[ResultColumn] [UIOMaticIgnoreField]
Check out the poco from the example here https://github.com/TimGeyssens/UIOMatic/blob/master/src/Example/Models/Dog.cs#L35
But it seems you have 2 with the alias Name, so you'll have to have an as ... in your query
I have updated my POCO accordingly, to name them uniquely. I have also added the LanguageName to my POCO, and given it the attributes as Iyou linked;
Making it;
However, my FK is still not being replaced with the new field;
Anything else I can do?
Which ui o matic version are you using, for an item to appear in the list view you also have to mark it with an attribute
so with the attri [UIOMaticListViewField]
It looks like I managed to get it working! basically what I did after changing the attribute, is move the LangaugeName next to LanguageId, and removed
from LanguageId.
I added what i removed, to LanguageName instead, and well, it works how I want it to be honest;

My POCO for what I mean;
Does that do the trick? It won't replace it but will add a new column... if you wish to remove the id column then don't mark that with the attribute
Great, glad you have it working!
is working on a reply...
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.