Update Column value in frappe listview


I want to change column value in frappe listview. for example, i have created two doctypes one is person doctype and another is city doctype. I am storing auto name field of city doctype inside person doctype.

Now i want to display city name in-place of city autoname in person doctype listview. Is it possible?
If yes then how?


You will have to fetch the city name in the person doctype and then set it in the listview

Thank you for the prompt response of my question.

How can i fetch and set the same in the listview without inserting city name column in person doctype as i am very new with this frappe?
It would be great help for me, If you can share any demo link or any sample code. so i can get better idea.

You can search for linked fields in the frappe tutorials.

I know about linked field.

But i am using jquery autocomplete to populate city name with extra string on insert/update event. One more thing, on “after_save” event i am storing city auto name of the city doctype in person doctype city field.

So i can not set city name in listview.

For more detail:

I think that it is pretty bad use of Frappe framework in general but you may try this:

  • Add a new field (Like “Current City Text” with data type)
  • Set the value of “Current City Text” to city info text which user is selected in the “after_save” event.
  • Set “Current City Text” field as “Show on listview”

Something like should resolve your issue.

The purpose behind the same is to avoid my effort for updating city name in person doctype.

For example, i am updating city name from the city doctype like small spell correction.

In my case no need to do any data level changes in person doctype because i am storing city auto name. so it will reflect automatically.

According to your suggestion, i have to update “Current City Text” field in person doctype manually.

So I have chosen this option.

If you have any alternate solution, let me know. I will check and implement the same.

Even I need something like this. Anyone found solution for this?

Hy Glob,
Can you help me
how to autocomplete input forms with data types
Thank you

Hello Misbah,

I am using select2 javascript autocomplete plugin with data type “Data”.

Hello @Glob

Can you please provide an example of select2 library usage in frappe ?