Transaction levels in Native Mobile

Transaction levels are not fully-automatically supported in WorkWithPlus for Native Mobile. User will have to make some modifications in order to properly implement sublevels.

Default behavior

As we explained here, due to GeneXus Native Mobile generator restrictions, Transactions cannot be used "directly" in a Native Mobile environment. This means the transaction's sublevel cannot be edited at the same time as the transaction's header, as it is possible in Web environments.

For this reason, when WorkWithPlus is used over a transaction, it creates separated Panels for the Transaction's header, and the sublevel's grid.

By default, this sublevel can only be used to 'view' the sublevel list, it does not support 'expanding' it. In other words, the sublevel cannot be opened, inserted or edited.

e.g.: If you have the following Transaction: 'Country', with a sublevel named 'City'

NM_TrnLevel_Country

Applying WorkWithPlus will create the data entry panel for the 'Country' Transaction's header, and also a 'Tab' for the sublevel 'City'.

This 'Tab', can only be used to display the available sublevels, but the sublevel can not be opened, edited or inserted.

NM_TrnLevel_Country_WW

Important: By default, WorkWithPlus will generate the "Insert" standar action, but this action does not actually implement sublevel insertion. User will need to implement the sublevel panels first.

Implement sublevel operations

Although there are several approaches that can be used to implement sublevel operations, we strongly recommend the use of a 'Parallel Transaction' over the sublevel, as we will explain below.

Sublevel with parallel transaction

For this simple implementation, you will need to create a parallel transaction for the sublevel you want to implement operations, and apply a separate WorkWithPlus instance to it. This will create the required Data View and Data Entry panels to manipulate the sublevel, and will hook them in the original Transaction's pattern instance.

Step 1: Create the parallel transaction for the sublevel.

e.g.: Consider the 'Country' Transaction shown previously, create a new Transaction 'City' as follows:

NM_TrnLevel_City

Remember, this new Transaction must not provoke a reorganization. If it does, it means the Transaction's keys does not match. You must consider that to create a 'Parallel Transaction' you must merge the sublevel keys with the Transaction's header keys.

Step 2: Apply WorkWithPlus using this new transaction.

Create a new Panel and apply WorkWithPlus using this new Transaction.

This will create the required Data View and Data Entry panels to manipulate the sublevel.

You can remove the 'List' node, as it will not be required.

NM_TrnLevel_CountryCity_WW

Step 3: Set the new Transaction in the sublevel Grid Tab.

Open the original Transaction's instance, and navigate to the sublevel node.

Select the 'Relation Transaction' node, and modify the properties to match your new sublevel's parallel transaction.

NM_TrnLevel_Country_WW_levelEdit

After the instance is applied, you will notice that the generated code will now reference the new sublevel's parallel transaction Panels.

NM_TrnLevel_CountryCity_WW_Code