20-03-24 10:24 AM
I'm seeking advice on structuring a data storage system for the last 6 months' worth of codes. Each code follows a consistent pattern: GOV followed by a number representing the month (e.g., GOV3, GOV2, GOV1, GOV12, GOV11, GOV10). What would be the most efficient method to organize and manage these codes as separate data items while ensuring easy access and retrieval?
Answered! Go to Answer.
20-03-24 01:42 PM - edited 20-03-24 01:43 PM
Hello Sandy!
I would have 6 Data Items named according to the month to be searched for;
And so on... at the beggining of the process flow I'll put a Multicalc Stage that send the values to each Data Item with a simple function;
"GOV"&ToNumber(FormatDate(AddMonths(Today(); -1),"MM"))
And ensure that checkbok "hide from other pages in the process" is unchecked to make them Global so you can use those Data Items anywhere on the process flow.
Hope this helps
20-03-24 01:42 PM - edited 20-03-24 01:43 PM
Hello Sandy!
I would have 6 Data Items named according to the month to be searched for;
And so on... at the beggining of the process flow I'll put a Multicalc Stage that send the values to each Data Item with a simple function;
"GOV"&ToNumber(FormatDate(AddMonths(Today(); -1),"MM"))
And ensure that checkbok "hide from other pages in the process" is unchecked to make them Global so you can use those Data Items anywhere on the process flow.
Hope this helps
20-03-24 02:11 PM - edited 20-03-24 02:13 PM
Hello,
I have already been through a project with a similar requirement, because in our scenario we needed to consult both the complete value and just the code, what we did was create an auxiliary column that contained only the code, and a second column with the value suffix, according to the requirement we could have other suffixes, we abstracted the logic through a view in the Database (I don't know if this is your case), and we transposed the data to the collection later for reasons of performance and execution duration (high volume);
Regards