Add Fields To Panel from Javascript

415 views
Skip to first unread message

georgopou...@gmail.com

unread,
Nov 27, 2023, 7:57:08 AM11/27/23
to Softone Developers Network
Hello all.


Does anyone know, if there is a way to add fields to a panel via javascript.

I haven't found a way in the Black Book.


Thanks in advance.

Cosmin Vestemean

unread,
Nov 27, 2023, 8:17:32 AM11/27/23
to so...@googlegroups.com
Hi,

One way would be to add them on form creation as invisible and set them visible when needed.

--
Softone Developers Network group.
To post to this group, send email to so...@googlegroups.com
---
Λάβατε αυτό το μήνυμα επειδή έχετε εγγραφεί στην ομάδα "Softone Developers Network" των Ομάδων Google.
Για να απεγγραφείτε απ' αυτή την ομάδα και να σταματήσετε να λαμβάνετε μηνύματα ηλεκτρονικού ταχυδρομείου απ' αυτή, στείλτε ένα μήνυμα ηλεκτρονικού ταχυδρομείου στη διεύθυνση soft1+un...@googlegroups.com.
Για να κάνετε προβολή αυτής της συζήτησης στον ιστό, επισκεφτείτε τη διεύθυνση https://groups.google.com/d/msgid/soft1/1b7ea741-5351-4172-8d6b-809491f42617n%40googlegroups.com.

georgopou...@gmail.com

unread,
Nov 27, 2023, 8:24:23 AM11/27/23
to Softone Developers Network
I know this trick. 

I use it.

But I need something more dynamic.

Liviu Buligan

unread,
Nov 27, 2023, 11:15:21 AM11/27/23
to so...@googlegroups.com
I am afraid this is not possible. In the form we do not address fields, we deal with Windows components, that have more properties than the dataset field. If you analyze the form structure press Ctrl+ALT+Shift+F11 in a design of a form you will see how it is stored. That is actually something like a Delphi form - *.frm. It is a complex format, involving data about the control properties.

Για να κάνετε προβολή αυτής της συζήτησης στον ιστό, επισκεφτείτε τη διεύθυνση https://groups.google.com/d/msgid/soft1/a9a7e35b-4314-496b-b340-2be97e730844n%40googlegroups.com.


--
Liviu Buligan

Νίκος Μάλιακκας

unread,
Nov 29, 2023, 6:24:28 AM11/29/23
to Softone Developers Network
For our customs, we often use deticated virtual fields with standard editors that we hide if they are not needed by the record flow.
If you try to change an editor of a field in run time to something else, then you will get an empty selector.
You can change i.e. ITEM to ITEM(W[yourcustomselection]) but you cannot change ITEM το CUSTOMER on the fly.

For small tables like categories, groups, manufacturers, models, or usertables I use STRINGS in an object, assign the editor to that string, and change the string list from javascript based on user clicks.
Thus you have one editor that can show different values based on the user input, but is the classic single selector for memory tables.

ionut.n...@gmail.com

unread,
Nov 30, 2023, 3:42:04 AM11/30/23
to Softone Developers Network
Hi,
You can add a UserPanel in your object with HTML in user editor and make an html small page with javascript. There you can do almost everything especially if you want to add dinamically some virtual fields (and after the user inserts some data in  those fields, if you want to keep the values, just add them on a text field in Soft1 like it is done on SOVAL like fields)....

This is from designer on a custom object for example:

ScreenshotObj.png
and in javascript section just use 'external' for Softone commands:

<script>  
 
function ExecComanda(comanda) {
X = external;
X.EXEC("xcmd:" + comanda);
}
</script>


Hope it helps!

Cosmin Vestemean

unread,
Nov 30, 2023, 4:02:29 AM11/30/23
to so...@googlegroups.com

--
Softone Developers Network group.
To post to this group, send email to so...@googlegroups.com
---
Λάβατε αυτό το μήνυμα επειδή έχετε εγγραφεί στην ομάδα "Softone Developers Network" των Ομάδων Google.
Για να απεγγραφείτε απ' αυτή την ομάδα και να σταματήσετε να λαμβάνετε μηνύματα ηλεκτρονικού ταχυδρομείου απ' αυτή, στείλτε ένα μήνυμα ηλεκτρονικού ταχυδρομείου στη διεύθυνση soft1+un...@googlegroups.com.
Για να κάνετε προβολή αυτής της συζήτησης στον ιστό, επισκεφτείτε τη διεύθυνση https://groups.google.com/d/msgid/soft1/bf0ca1c6-5533-4c07-8f18-a4ed1ee66473n%40googlegroups.com.

Cosmin Vestemean

unread,
Nov 30, 2023, 4:04:47 AM11/30/23
to so...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages