Create a field not bound

ferrisferris Member Posts: 23
How can I create a field not bound to the database with a lookup?

Comments

  • ashishguptaashishgupta Member Posts: 24
    Do the following............
    1.) Create a textbox.
    2.) define a global variable. assign this global variable as source expression of the textbox in the textbox property.
    3.) then define the tablerelation property of the textbox.
  • ferrisferris Member Posts: 23
    Thanks very much!
    Another similar questions: how can I create a column of a table box not bound to a table and with a lookup? In this case the number of rows is not determinable a priori (the first column is bound to a database table and it determine the dimension of the table) and so a global variabile isn't usable.
  • bbrownbbrown Member Posts: 3,268
    Create a function on the table that returns the desired value. Display this result in the textbox.
    There are no bugs - only undocumented features.
  • ferrisferris Member Posts: 23
    But what is the source of the column? I can't insert a column without a source expression.
  • Miklos_HollenderMiklos_Hollender Member Posts: 1,598
    A variable. View menu, Globals or Locals.
  • bbrownbbrown Member Posts: 3,268
    The source is the functon's result.
    There are no bugs - only undocumented features.
  • ashishguptaashishgupta Member Posts: 24
    Dear Ferris,
    Do the following............
    1.) Select a textbox from toolbox and put it in tablebox.
    2.) define a global variable. assign this global variable as source expression of the textbox in the textbox property.
    3.) then calculate and assign the value to this variable onAfterGetRecord trigger.
  • ferrisferris Member Posts: 23
    The global variabile is a Code or somethings else?
    If I use a Code each row share the same variabile and so the value of the column isn't permanent.
    Thanks
  • ashishguptaashishgupta Member Posts: 24
    The global variable can be code or anything else. It depends upon you that what type of data u want to store in it.
    Each row would have different varable b'coz you will write the code in OnafterGetRecord() trigger. as I mentioned in last mail.
    First try the solution given in last mail. Then If u have any query ask.
  • ferrisferris Member Posts: 23
    But I don't now a priori the number of row in the tablebox: how can I calculate and assign the value to the variable onAfterGetRecord trigger?
  • bbrownbbrown Member Posts: 3,268
    If you use a function on the table:

    1. You don't have to write any form code.

    2. The value will be calculated and displayed independently for each record in a tablebox.

    3. You can re-use the function elsewhere, such as a report.
    There are no bugs - only undocumented features.
Sign In or Register to comment.