Making a smart field a link to entry in other collection

Expected behavior

Please describe here the behavior you are expecting.

Actual behavior

What is the current behavior?

Context

We a smart field in a forest collection:

fields: [
    {
      field: 'textID',
      type: 'String',
      get: transaction => {
        const textID = transaction.details.get('textID');
        if (textID) {
          return textID;
        } else {
          return '--';
        }
      },
    },
];

by clicking this field it should redirect you to that particular entry in other collection. These collections don’t have any relationships. It is supposed to work the same way you have it in your demo app when in Customers collection you click address and it shows Address details of that particular customer. Do you have any workaround for this situation? Setting up a relationship between two collections would required db redesign which is something we don’t want to do at this point. Thank you!

  • Package Version:
  • Express Version: 4.16.3
  • Sequelize Version: not applicable
  • Database Dialect: MongoDB
  • Database Version: 4.2.8
  • Project Name:

Hi @Dmytro,

Thank you for sharing your situation!

Actually, I think what you’re looking for is called smart relationship.
You can have a look to the related documentation here.

Please tell me if this helps :slight_smile:
Cheers!

2 Likes

Hi, @anon34731316! Thank you for your advice! That’s what I was looking for! :handshake:

2 Likes