I have google sheet data. And i want to edit data, how to edit data and save by Action in Flipabit?
First check this video Create a Shopping App from Google Sheets | Flipabit - YouTube
You can connect a text field to the table in the same way as in the video. To write the changed value just call the action Change current field
.
In the example from the video, I converted the title
text widget into a text field.
And added a save button that writes the changed value to the table.
See the example vinyl_app_edit.pma (58.2 KB)
You need to use your credentials:
Wow, Many Thanks for your help.
if i want to change more fields, examples " Title" and " Dercripstion". How to use " Action"?.
It is not working
It really doesn’t work and we will improve it in the next version.
This is because the actions are performed asynchronously and the save of the first field causes a data change signal, and the second field updates its value and the entered changes are discarded.
As a workaround, you need to use a helper string for each field you plan to modify.
Here is the example project vinyl_app_edit_multiple.pma (58.8 KB)
Another way is to create a Json string with all the required fields. And then commit all changes in one step.
To do this, you need to use a template string:
Here is the example project vinyl_app_edit_multiple_json.pma (58.8 KB)
Working perfect. Thanks your help!
after adding a new (text) input field, bind it to a data-column, the correct value is displayed.
But when I click in that field (to edit), the contect disappears and I only get a blank (input-)field.
Where do I have to change a setting?
And if possible an example pma-file with all the actions needed to add a record with multiple fields (input widgets) to Google Sheet.
Thanks !
To save multiple fields in the database at the same time, do the following:
- Add a Query begin action
- Add a Query field action for each field you want to save. Specify the field name and value as arguments.
- Add a Query end action that saves all fields.
Here is an exmple save_multiple_database_fields.pma (19.5 KB)
Has someone any suggestions for my problem :
after adding a new (text) input field, bind it to a data-column, the correct value is displayed.
But when I click in that field (to edit), the contect disappears and I only get a blank (input-)field.
Where do I have to change a setting?
Maybe you have set event to changed
Could you share your project. I’ll check it. It will be useful if you record a video with an error.
Here’s a copy of my project, but data is saved in a Google Sheet, so probably not included in de pma-file.
It’s in Dutch, but I’ll explain what I’m doing (don’t know how to record a video :())
If you can see any data then :
- open the main-page “LIJST” (bottom-left-menu-button)
- you get a list of streets and a list of house-numbers in the right column - >> choose Achiel Van Ackerplein with number 3
- you’ll get a detail-screen; then choose in the three-dot-menu " WIJZIGEN" (=Dutch for EDIT)
- you get the edit-screen, and choose the Wikipedia-icon to see the same data
BUT THEN… when clicking in the data-field (to modify some text), the data diseappears…
If you don’t have the data, the modify-screen is called “WIJZIGENPAGINA”
Thanks for having a look.
Wim
(I can’t upload the file - I get a popup “Sorry, new users can not upload attachments.”). I’ll send it by mail.
When active, the widget’s font is white, as is the background. You need to change the font color.
Oh, so simple… but you have to know…,
Maybe a suggestion to change (in a next release) the default font-color to black?
In your answer in this post in August 2022 (see above) you mention that in a next version, it will be easier to save multiple changes at once.
When can we expect that new version?
Wim
I could now change a field in my GoogleSheet (happens immediately), but the database in my app seems not be updated automatically.
So I added a second action on my “save”-button to update the database (with a delay), but this has no effect.
Could you send your project. I’ll check it.
I send it by mail; thanks for helping
Hi Michael,
In my GoogleSheet, values may contain some HTML-syntax, like “This is the first line. <br>This is the second line
”.
On my “edit-page”, I see (correctly):
This is the first line
This is the second line
But when I change some characters, the whole value is “converted” to :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:italic; letter-spacing:0px;">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This is the first line. <br>This is my second line.
If there’s only text (so without a <br>
), only plain text is returned after changing (is OK, that’s how I want it)
How can I keep a text-area as plain-text (even with <br>
)?
Wim