Is there a way to set the useAsTitle property with a relationship's field? #3304
fvcci
started this conversation in
Feature Requests & Ideas
Replies: 2 comments 1 reply
-
Maybe you can do something like this: {
name: "title",
type: "text",
hooks: {
beforeChange: [
async ({ data }) => {
// fallback?
// also dont know if data.cyclistRelation is an ID or the full object
// otherwise use the internal payload api here
return `$(data.name) - $(data.cyclistRelation.title)`
}
]
}
}, |
Beta Was this translation helpful? Give feedback.
1 reply
-
Is related to #3257 I think it can be more useful than using the virtual fields paradigm. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Let's say I have a collection named "Person" and another collection named "Cyclist". They follow an Entity-relationship model where Cyclist has the properties of a Person like their "name" for example. Cyclist has the relationship field to Person, and I want to set the useAsTitle field when creating a Cyclist to the Person's name. Is this possible?
Beta Was this translation helpful? Give feedback.
All reactions