How to make Make Alpha dialog or popup dynamic

Hi all

Am trying to use one dialog for add and edit. Instead of using two which are the same but differs in the header.

How can I make an alpha dialog header dynamic by string interpolating it instead of a static string.
I tried string interpolation on the header field but shows a variable name I have interpolated.
However when I console log it on the custom code it logs a value of a variable that is interpolated.

Please see the images below for better reference.

Thank you in advance.


1 Like

@vaibhav @gaurav.pandey @Irfan_Ali please help

1 Like

Found the below snippet code which could really assist me but console logged pages is empty.
And is this http://el.name/ the url of the page ??

const pages = await ap.pages.get();
console.log(pages)
const newPage = pages.find((el)=> el.name == ‘Page name’);
ap.dialog.open({
page: newPage,
height:‘50’,
width: ‘50’,
header: ‘Title’
})

1 Like

Hi @Simphiwe , Try using {{co.abc}} in the header field instead of string interpolation. It should display the dynamic value correctly.

3 Likes