question

Borja Lorenzo avatar image
0 Likes"
Borja Lorenzo asked Borja Lorenzo answered

Edit combo box to read global table and insert selection into query

Question updated on 23/09/24 at 11:58 am.

Hello,

I would like to request help to create a “simple” dashboard for the user. The attached model is a simplification, and the context is that the model reads a database. Through two queries, a series of data is imported, which the model interprets to define the state of an installation to be simulated. In the connectivity activity, you can see the queries. In Global Table 2 are the main data, and in Global Table 3 is a simple list of all the different available times. This query takes the data from a specific moment. What I want is for a user, who is not a technician, to be able to select the time to simulate. Since these are moments in milliseconds, the exact value is unknown, and it is not user-friendly for someone to enter the query and paste that time data. I wanted to offer the user a panel where they can read the times and choose one. This selection should be inserted into the query that extracts the information and updates Global Table 2.

The selected date and time (hour) in the combo box should be inserted here:

1727085527776.png

My idea is to put one (or several) combo boxes on a panel that, when expanded, show this time table (Global Table 3) from which to read this date/time data and select it. Upon selecting the value, the process I described earlier should occur (insert this date into the main query). Since the list of times can be very large, we should consider multiple combo boxes for the user. The user would start by selecting the year (the available years within that list of times); a second combo box would use this selected year to offer the available months in the list for that year. This would continue, applying filters to provide only the available times down to the milliseconds of a specific minute.

Thank you in advance for your support.



20240921_CPLab_simplificación_1.fsm

FlexSim 24.1.1
global listsql querycomboboxbasedata
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jeanette F avatar image Jeanette F ♦♦ commented ·
Hello @Borja Lorenzo,

Your profile was marked as student, so your post had been low prioritized. We have corrected your account assignment and increased the priority of your posts. Given that this post was created several weeks ago, do you still need assistance with this?

0 Likes 0 ·

1 Answer

Borja Lorenzo avatar image
0 Likes"
Borja Lorenzo answered

Hi,

I appreciate it. In this case, I was able to solve it using the FlexScript Class - Database.PreparedStatement.

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.