Attach with relationship showing different search option label
I have table A with name that has one-to-one relationship with table B (has a_id and no name). and table C has many-to-many relationship with table B. How do i attach data from table B to table C by searching using name from table A? I know how to use a_id from table B but its weird to attach using id.
7 Replies
Can you share a bit more context? Do you have some code you've been trying that you want to improve?
I am using Relation Manager "attach" action, I've been trying to figure out how to search using it's parent attribute ('name' field).
works cause the field exist, is there a way to access it's parent attributes? If it doesn't, is there a way I can change the Select option label so the option can be identified by name instead of id or maybe even custom the search like in multi-select?
I'm not sure if you can make the search work, I think it's a bit out of my depth.
But I think it should be possible at least to show the correct label in the Select field.
With
->getOptionLabelFromRecordUsing()
@pboivin nope
getOptionLabelFromRecordUsing
doesnt effect record select in attach at allCan you share the code you have tried?