Set value of new or existing record from a value on an open form from another table

I would like to do the following:

  1. Open a form named โ€œServiceLog 2โ€ (new or exiting record)

  2. Click on an inline behavior action to open another view โ€œExpensesโ€ and the KEY column use the value from the KEY column of the record being viewed on the open form โ€œServiceLog 2โ€. When done with the view โ€œExpensesโ€, return to the open form โ€œServiceLog 2โ€.

  3. Solved

  4. Needs solving

Solved Solved
0 13 332
1 ACCEPTED SOLUTION

  • Add a ServiceLog column (physical) to the Expenses table.
  • Regenerate the column structure.
  • Expand the column structure
  • Set the column type to REF, choose Service Log table and turn on isPartOf property.
    Save the editor. When you create a ServiceLog record, you can create as many as Expense records and it will always return back to the ServiceLog form.

View solution in original post

13 REPLIES 13

Whatโ€™s the question? Or do you have one?

I do not know how to solve #2.
What expression can I use to have the KEY column of โ€œExpensesโ€ default to the value of the KEY column of the open form โ€œServiceLog 2โ€ when adding or editing a record in โ€œExpensesโ€ ?

( #3 and #4 were labeled as #1 and #2 but autocorrect must have changed them without me noticing )

You need to a reverse reference between the ServiceLog 2 and Expenses with isPartOf set to TRUE.

Unfortunately, I am not familiar enough with it and would need more details on how to do that.

How is your table structure for both tables? Can you give a screenshot?

  • Add a ServiceLog column (physical) to the Expenses table.
  • Regenerate the column structure.
  • Expand the column structure
  • Set the column type to REF, choose Service Log table and turn on isPartOf property.
    Save the editor. When you create a ServiceLog record, you can create as many as Expense records and it will always return back to the ServiceLog form.

That works great. Thank you so much.

Youโ€™re welcome

Hello Levent,

I have encountered something that I need to change but do not know how.

When adding a new โ€œRelated Expenseโ€ from the inline section of the Details view of ServiceLog, the label shows โ€œAddโ€, which is fine ( 1st image attached ).
When adding a new โ€œRelated Expenseโ€ from the edited Form of ServiceLog, the button label shows โ€œNew Complaintโ€, which is not what I want ( 2nd image attached ).

I believe this is a remnant of the original structure of the sample app before I made numerous changes.
A field in the ServiceLog table was originally named โ€œComplaintโ€ but is now named โ€œSubjectโ€, but I donโ€™t know if this is related to my issue.

I need to change the button label to be โ€œAddโ€ or โ€œNewโ€ or something similar.

I have looked in many places but have not found where to make the needed changes.

Thanks, Bill

3X_f_a_fa0a398a53c1b94aa541f3beb66a5a0f9a931bad.png

3X_a_2_a2c5737c7d55a3453678f9b94e21381887d4707a.png

@Bill_Hyde
Check the Localize setting for New appearing in the ref/reverse ref columns

Success. Thanks so much.

Youโ€™re welcome.

Top Labels in this Space