Table Row Button to open form with table row details #14558
-
Hi, Apologies if this is a rather simple question, but I am stuck. I have a create record form working okay, which will add records to a table all okay, and i have a table that can list all records in the database table, this budibase table has a button on the end that I want to be able to click on and populate a form which will let me edit the record values. I have parsed the value i want (prefixed_referralID) to the title of a Card and i can see it change depending on the button i click on. However the form doesnt populate with the data. My current screens are: /xxx/edit:id -> this is the page that i need to load with the form on to edit the row selected data the button on the '/xxx/list' page has a Navigate To action to 'Screen' /xxx/edit/ {{ New Table.xxx.prefixed_referralID }} /xxx/edit/:id Data Provider, Repeater and a card, the Card Title does change to the prefixed_referralID depending on the recordi Click but the form doesnt populate with data. Any help would be greatly appreciated |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hey @Dretreyt "i have a table that can list all records in the database table, this budibase table has a button on the end that I want to be able to click on and populate a form which will let me edit the record values." In the Then, wherever you want to update that record, use a Form Block, set to Update, and pass it the state you've just declared Each time a different row is clicked, that row's ID is set in state, which will update the information in the Form Block. |
Beta Was this translation helpful? Give feedback.
-
Hi Mike,
Absolute legend, thanks for your help on this.
Kind regards
Rob
Robert Burt
NEC Software Solutions
Bexley Civic Offices
Tel: 020 3045 3793
Ext: 3793
Annual Leave:
From: Mike Sealey ***@***.***>
Sent: Wednesday, September 11, 2024 4:45 PM
To: Budibase/budibase ***@***.***>
Cc: Burt, Robert ***@***.***>; Mention ***@***.***>
Subject: Re: [Budibase/budibase] Table Row Button to open form with table row details (Discussion #14558)
Hey @Dretreyt<https://github.com/Dretreyt>
"i have a table that can list all records in the database table, this budibase table has a button on the end that I want to be able to click on and populate a form which will let me edit the record values."
In the On Click actions, use an "Update State" action to set the name of the state to be prefixed_referralID, and the value to be the _id. (I'm using sample data)
image.png (view on web)<https://github.com/user-attachments/assets/d4b77f36-1b2c-4a5e-b5a3-0897488c3c9f>
Then, wherever you want to update that record, use a Form Block, set to Update, and pass it the state you've just declared {{ State.prefixed_referralID }}
image.png (view on web)<https://github.com/user-attachments/assets/73138269-1a23-409a-9351-ec5423328c98>
Each time a different row is clicked, that row's ID is set in state, which will update the information in the Form Block.
—
Reply to this email directly, view it on GitHub<#14558 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BGD5TV6ETPRS3YMFPBNOJ6DZWBQP3AVCNFSM6AAAAABOA4OLHKVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTANRRGYYTINI>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
Click here<https://www.mailcontrol.com/sr/V_Sw9L4hFjfGX2PQPOmvUiOFufhVdryLJdHEWsBUZXjQkka8PjGnR1tEfPhs5jgwduk9YBMe9pig1M3YVHc55g==> to report this email as spam.
Our Privacy Notices<https://www.bexley.gov.uk/services/privacy-notice> detail how the London Borough of Bexley use your personal information.
This Email is confidential and intended solely for the use of the individual to whom it is addressed. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing or copying of the email is strictly prohibited.
If you have received this email in error please notify London Borough of Bexley by telephone on +44 (0) 20 8303 7777.
Web Site: https://www.bexley.gov.uk<https://www.bexley.gov.uk/>
[Current-Banner]
This message has been scanned for malware by Forcepoint. https://www.forcepoint.com<https://www.forcepoint.com/>
|
Beta Was this translation helpful? Give feedback.
Hey @Dretreyt
"i have a table that can list all records in the database table, this budibase table has a button on the end that I want to be able to click on and populate a form which will let me edit the record values."
In the
On Click
actions, use an "Update State" action to set the name of the state to beprefixed_referralID
, and the value to be the_id
. (I'm using sample data)Then, wherever you want to update that record, use a Form Block, set to Update, and pass it the state you've just declared
{{ State.prefixed_referralID }}
Each time a different row is clicked, that row's ID is set in state, which will update the information in the Form Block.