Skip to Content
Menu
This question has been flagged
6314 Views

I would like to check if the id of a model exists in another attribute of another table.

E.g.: I have inserted a new entry in '1st_model', which id is '1'. When I go and see the form view of this entry, a function must be able to check if there is a value '1' in the field 'example' of the table '2nd_model' (example=1 is True)..

Is it possible to write such a function?

Avatar
Discard

yes quite easy. just make your second field as computed and on method of computed field use search on another table or any logic what you need.

Author

Could you explain better, please? Thank you!

Related Posts Replies Views Activity
0
Jul 24
194
2
Dec 22
12876
1
Nov 21
3148
0
Jan 21
1072
8
May 20
6255