Here we will be addressing the issue of changing array data (Multi-Valued) to single data, and vice versa. Changing the type, or other system-specific features, of a field is highly discouraged, because it may affect the performance of your application.
Case 1: Multi-Valued to Single Value Data
To illustrate, let us consider the Course tipo. Say, we began with the Course having multiple Units, however, after some time and deliberation, decided that it is no longer needed since all Courses should have only 1 unit. Because of this we decided to change the Multi-Valued setting of the Units field.

Changing from array, or multi-valued, data to single-valued data disrupts how data is shown for that field, in this case the Units field for the Course Tipo. If before, Courses were presented in the manner shown in the image below:


After changing the function, the Courses currently stored in your application will look similar to what is shown below:


This presents the existing related data, previously listed in separate individual links, to a single line of texts within brackets. Correcting existing data will be tedious and time-consuming, forcing you to revisit and revise all the exiting data and changing their Units one-by-one.
Case 2: From Single-Valued Data to Multi-Valued
Similar to the previous situation, changing single-valued fields to multi-valued settings affects how data is presented, and at times, impacting existing data. Using the Course tipo to illustrate, say we want to change Unit from single-valued to a Multi-Valued setting.

Doing such would greatly affect an existing data you may have. Before the change, data would be presented similar to the image below.


However, after changing the data settings, data for the Units field will no longer show.


You will have to manually correct all the existing data to ensure that the preferred Units are added. Again, this will be tedious and time-consuming. Changes to system-specific data are not encouraged to avoid such problems to existing data and other aspects of your application.
If you really need the change, instead of changing current setting, create a new Field for the tipo, and add the JS Expression loading the existing data of the old field to the new one. This will be a more convenient way of addressing your data problem.
Comments
0 comments
Please sign in to leave a comment.