Here is an idea which seems to work, but needs more evaluation. What if you
named the form object with the property path in the form data? Even if periods
are not allowed (they seem to be), another character could be used. I think the
maximum length of an object name is 255 characters which should be plenty.
Here is an example. I created a form with one in input and the object method
below. The form object name is "some.property.path" and the expression is
Form.some.property.path.
Case of
: (Form event code=On Load)
Form.some:=New object
Form.some.property:=New object
Form.some.property.path:="TEST 123"
: (Form event code=On Data Change)
C_TEXT($name)
C_COLLECTION($cPath)
C_OBJECT($object)
$name:=OBJECT Get name(Object current)
$cPath:=Split string($name;".")
$object:=Form
For each ($name;$cPath.slice(0;-1)) //All except last element to get the
object.
$object:=$object[$name]
End for each
$name:=$cPath.pop()
$object[$name]:=Uppercase($object[$name])
End case
John DeSoi, Ph.D.
> On Apr 30, 2020, at 7:53 PM, Peter Hay via 4D_Tech <[email protected]>
> wrote:
>
> What we really need is a way to access a Form Object's "Variable or
> Expression". There's a Command named "Object Get Data Source" which was
> added in v14, but it only returns a Pointer if "Variable or Expression" is
> a Variable. If it's an Expression it returns Nil.
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive: http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:[email protected]
**********************************************************************