rowyio / rowy

Low-code backend platform. Manage database on spreadsheet-like UI and build cloud functions workflows in JS/TS, all in your browser.
http://rowy.io
Other
5.83k stars 478 forks source link

Support HEX format in number field type #736

Open harinij opened 1 year ago

harinij commented 1 year ago

Discussed in https://github.com/rowyio/rowy/discussions/735

Originally posted by **KKimj** August 3, 2022 I want to See number with HEX, hexadecimal format. image e.g., 0xFF001122 I want to Read / Write with hexadecimal number! image Could I Do this with Rowy? Please let me know Thanks!!
mnmt7 commented 1 year ago

@harinij, I wanted to discuss with you a solution regarding this issue. One approach we can take is to allow the user to input the hexadecimal value as a string in the corresponding cell. Once the cell loses focus, we can then convert the hexadecimal value to decimal and store it in Firebase. This way, the user can write the hexadecimal value, but won't be able to read it. However, we can still provide a functionality for the user to convert the decimal value being displayed back to hexadecimal.

Alternatively, we can store the value as decimal in Firebase, but include in the schema of the table to indicate for a particular column which rows are storing hexadecimal values. We can then convert the decimal values to hexadecimal for those specific rows.

It is important to note that storing the hexadecimal value directly in Firebase would require us to store it as a string, which may lead to issues when a formula field (or any other field that uses the value stored in number field) is used that expects a numerical value for Number Field Type.

If you have any other ideas or suggestions, please let me know.