Using PowerFX in custom pages
Here are some sample PowerFX you can use in Custom Page.
Show Notification in Custom Page
Notify( "Its a warning", NotificationType.Warning )
Navigate to another custom page
Navigate(CustomPage2)
Navigate to the default view of the table
Navigate( Contacts)
Navigate to specific system view of the table
Navigate( 'Accounts (Views)'.'My Active Accounts' )
Navigate to the default form of the table for a selected item from gallery
Navigate( Gallery1.Selected )
Navigate to a specific form of a table for a selected item from Gallery
Navigate(
accountgallery1.Selected,
{ Page: 'Accounts (Forms)'.Account } )
Navigate to a specific custom page with a record input
Navigate(
AccountGallery.Selected,
{ Page: 'Account Record Page' } )
in the target custom page, you can use Param to fetch id and name of the entity record passed, example given below. Here I have used Account Edit Form and binding the record passed from previous page.
AccountEditForm.DataSource = Accounts
AccountEditForm.Item =
LookUp( Accounts, accountid = GUID( Param("id") ) )
Navigate to the default form of the table in create mode
Navigate( Defaults( Accounts ) )
Navigate to the default form of the table in create mode with field defaulted
Navigate(
Patch(
Defaults(Accounts), { 'Account Name': "xyz", Phone: "555" } )
)
Navigate back
Back()
Hope this helps.