AnsweredAssumed Answered

How can I check a field dynamically and also set it?

Question asked by disabled_Luna.media on Dec 12, 2016
Latest reply on Dec 12, 2016 by disabled_Luna.media

Hi,

 

my database contains a few different "phone"-fields and I want to perform a script when entering and leaving theses fields with as little script as possible. This is to minimize the need to declare each time such fields are scripted exactly the field name again and again.

 

This question is more about how to do to the most elegantly - as the script s itself do work fine.

 

What I have currently is

 

 

  1. Wenn [ Table | Subtable::Phone = "" ]
  2.   Script ausführen [ “PhoneScript” ; Parameter: Field1 & "¶" &  Field2
  3.   Feldwert setzen [ Table | Subtable::Phone ; Hole ( ScriptErgebnis ) ]
  4. Ende (wenn)

 

I wonder if (or better: how) I can eliminate the first and the third line by adding a third script parameter that give the script the exact table and field name. If have to add that my main table is NOT the curent table. The current table is reference by the main table of the layout via an ID of the current record.

 

And if possible: how can I set the value of the Phone-Field in the  "Table | Subtable" by a script step with the table- and field-name given by variables

 

Any ideas? Thanks!

Outcomes