First time poster who has learnt how do some pretty cool things so far by searching this community and watching some videos, but this has me stumped.
Basically my app has a collection of items, and on each item the user can add updates to that item. As there can be multiple updates per item I have the updates written to a separate table, then display the updates on the items as a collection.
When adding a new update the user clicks on the add button at the top of the updates collection, then types the update text into a description field. Now I would like to expand this to give the user the option to record the update as a voice recorded memo, with the text then transcribed by Open AIās āspeech to textā integration.
I have that part of things working fine, but the problem Iām having is allowing the user to edit the speech to text transcription before saving it. I think the two overlapping problems are that 1. the text-to-speech field isnāt editable and I canāt seem to ācopyā it into another editable field, and 2. at the āAddā form where I want the user to edit the text, that update record doesnāt yet exist until they click the save button.
Switch to a Custom Form. This will allow you to edit the data before its saved
Create a User Specific column to hold the notes. This should initially be empty
Extend your action that calls the speech to text integration to first wait until the target column is not empty, and then copy the contents of the target column into the User Specific Column above
Add a text entry component to your screen, and target it at the User Specific column
When your custom form is saved, write the contents of the user specific column as the Note.
Adding to what Darren said above, I think youāre configuring this as a column, opposed to an action. Maybe on your form, you can have a recorder, then a button that says āTranscribeā, and the speech-to-text action can go there, to write to the User-Specific column and you can allow users to edit from there.
Many thanks for the responses. Iāve tried, or at least I think Iāve tried the suggestions from both but still no luck. Iāve tried configuring the speech to text as an action rather than on the column, but it wonāt transcribe because it seems the audio file isnāt available for transcription until the record is saved. I think this is my fundamental issue - I canāt transcribe the recorded audio because the record Iām saving it to does not exist until saved.
Perhaps it is something to do with having is as a ācustom formā - which Iām not even sure what that is. Is that a custom screen from the navigation, or adding a Form Container within a screen?
I thought I was doing so well for a couple of weeks now losing confidence fast lol.
Yes, thatās your problem. You need to be using a Custom Form, which is basically just a details screen with some input components, which must be targeted at User Specific columns. Because itās a custom form, there is no submit button. So you have to add your own, and that button needs a create row action, taking the values from the User Specific input columns and using them to create a row in the destination table.
Got it, thanks for your help. All working now. Wasnāt easy to get my head around the ācustom formā concept. What I did was change the action on the default āAddā button in the collection to a āshow new screenā action, then built all the form elements (populating user specific fields in a new table) from there. With the custom form there was no option to insert the row id of the record the Add button was on, so I had to add another action to push that into the User table so that I could access it and push it into the target table.
Yeah, this is only a viable thing with the API, or when you use an on-submit action with a native form. With this custom form approach, you gotta get a workaround like you did.