Those were the only changes that I remember. I've packed up the changes I 
made to your app and attached them, just in case there's something I don't 
remember changing. I've also attached a screenshot of where I see "Medical" 
to make sure we're on the same page about what you're trying to accomplish.

As for where the functionality lies, I'm not exactly certain. I'm very new 
to web2py and I just happened to notice that using the format argument 
allowed id fields to be displayed according to another corresponding field 
in the database.

Attachments:
Packed app: http://dl.dropbox.com/u/169215/web2py.app.TechDictionary.w2p
Screen shot: http://dl.dropbox.com/u/169215/TechDictionarySS.PNG

On Thursday, February 21, 2013 7:35:52 PM UTC-6, Alex Glaros wrote:
>
> Instead of *db.Word.dictionaryTypeID* displaying (which is a foreign key 
> in db.Word), I’d like a value from the foreign table to appear, i.e., 
> DictionaryType. dictionaryName.
>
>
> In the example below, when user cascades down to the Word table, it only 
> shows db.Word.dictionaryTypeID but I’d like to add the corresponding 
> DictionaryType. dictionaryName value to it.
>
>
> def search_lang():  
>
>    grid = SQLFORM.smartgrid(db.HumanLanguage, 
> linked_tables=['Word','DictionaryType'], fields = [db.HumanLanguage.id, 
> db.HumanLanguage.languageName, db.Word.id, db.Word.wordName, 
> db.Word.definition, db.DictionaryType.dictionaryName,
>
>        *db.Word.dictionaryTypeID*],
>
>        user_signature=False)
>
>    return dict(grid=grid)
>
>
> id<http://127.0.0.1:8000/tech_dictionary/default/search_lang/HumanLanguage/Word.languageID/1?keywords=&order=Word.id>
>   
>   
> Wordname<http://127.0.0.1:8000/tech_dictionary/default/search_lang/HumanLanguage/Word.languageID/1?keywords=&order=Word.wordName>
>   
>   
> Definition<http://127.0.0.1:8000/tech_dictionary/default/search_lang/HumanLanguage/Word.languageID/1?keywords=&order=Word.definition>
>   
>   
> Dictionarytypeid<http://127.0.0.1:8000/tech_dictionary/default/search_lang/HumanLanguage/Word.languageID/1?keywords=&order=Word.dictionaryTypeID>
> 1 beaker    glass jar     1
>
>
> Want to replace the "1" under Dictionarytypeid with value from foreign 
> table.
>
> Thanks, 
>
> Alex Glaros
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to