show Name in Posted By instead of ID

A place for users and developers of the Xataface to discuss and receive support.

show Name in Posted By instead of ID

Postby muzafar » Tue Feb 21, 2012 11:06 am

Greetings,

In xataface view sections, we have id showing in Posted By, I want to change it to the name instead of ID, can you please lead me how can I change it to Name from ID?

please check the snapshot in which I have mentioned posted by.

your help will be greatly appreciated.

Thanks..
Attachments
posted_by.gif
posted_by.gif (8.49 KiB) Viewed 2973 times
muzafar
 
Posts: 44
Joined: Mon Nov 28, 2011 9:25 pm

Re: show Name in Posted By instead of ID

Postby ADobkin » Tue Feb 21, 2012 3:56 pm

You can use the getCreator() method in your table delegate class, as in:

Code: Select all
function getCreator(&$record) {
        return $record->display('userName');
}


Substitute whatever column name or function you use to determine the user name in your application.
ADobkin
 
Posts: 195
Joined: Mon Oct 22, 2007 7:31 pm
Location: Atlanta, GA, USA

Re: show Name in Posted By instead of ID

Postby muzafar » Wed Feb 22, 2012 12:57 am

yes thanks it's work.
muzafar
 
Posts: 44
Joined: Mon Nov 28, 2011 9:25 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 15 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved