Great work with the generated columns feature. I’d like to know if it’s possible to use properties from a related table in a generated column expression. I’m implementing a notification system, where the Notifications table has the “contentTemplate (string)” and “actor (User)” columns, among others. Is it feasible to define a generated column (name it “displayText”) for replacing a text within “contentTemplate” with the actor’s name?
For instance:
contentTemplate: “{{actor_name}} posted a comment in your photo.”
actor: Points to a record of Users. { name: “John Doe”, email: … }
displayText expression: REPLACE(contentTemplate, “{{actor_name}}”, actor.name)
displayText: “John Doe posted a comment in your photo.”
How can I accomplish that? So far, I’ve only been able to reach User’s objectId and ownerId.
Unfortunately only columns from table, to which generated column is added, can be used in generated column expressions. If you want to generate value basing on columns from other tables, you must do it in your code.
Or if you are using Backendless Push notifications, you can do it without the use of generated columns. This is what “Smart Text” is for in our push notifications templates.
Hi!
Thanks, I find Smart Text really useful but the notifications I’m talking about are not actually push notifications but just notifications that will be persistent within the app.