Automatic form filling if the user selects the first component

Hi
I have a form that writes to ‘rent collection’ table, and has values ‘unit number’, ‘tenant name’, ‘amount’, 'date ’ and ‘payment type’ .What i want is if the user chooses the ‘unit number’ from a choice component, then the ‘tenant name’ and ‘amount’ are automatically populated.
How do i do it ?

Do you mean you want to show that right in the form? That’s not possible, because you don’t have access to that unit number value to create a relation.

I would suggest creating a custom form that:

  • Writes the unit number to a user-specific column.
  • Use relations & lookups to retrieve the tenant name and amount values.
  • If you want users to edit the name & amount, create a button that write the lookup values to 2 user-specific columns, and add entry components for them on the screen.
2 Likes

Hi again
First the app is only for one manager so i don’t see the reason for user specific column.
Second the reason i want the form to automatically be filled when the unit number is selected is that the number of tenants is too many for a choice component to be used and furthermore if the manager were to write the name as a text entry there might be a mistake so that if a want to later relate the tenants name to the name in the ‘rents collection’ table to see if they paid the rent or not the a mistake in the form will create a whole new tenant and can’t be related to the right one.
Since i have a relation between the ‘unit number’, ‘tenant name’ and ‘rent amount’ in the ‘‘units’’ table how can i use that to automatically fill the rest of the form once ‘unit number’ is inserted or is there another way to do it ?

Then I think you can just submit the unit number using the form to the destination table, then use relations & lookups to bring the tenant name and rent amount over.

2 Likes

not what i was after but it will do
thanks

Can you explain what was your desired flow? I think the solution above satisfied your needs.

If possible, please share some screenshots so we can help you more.