I have multiline input and when I click a button it will generate some text and output in the multiline.
The text is generated by an API call.
The problem is that when I save it to database, the generated text is not being included. It seems it is not getting detected by the multiline.
The only way for the text generated to be detected is to do some manual edits on the multiline first.
How can I solve this issue?
you can add a custom state to the multiline input of type text and default value empty. And add a condition to the multiline input that changes the initial value when this state is not empty.
the condition set up:
Then finally, in the workflow that makes the API call, add a step that sets the state of the multiline to the piece of info that you want from the returned value. try it out it really works
Hi hanan! It works!
The only problem is that when I run the API call to generate text again is that it loses the previous text and will only save on the content state is the most recent text generation.
How can I put all the generated text into the custom state “content”?
@hirayaleads no worries. You just need to make a few tweaks:
1. append the generated content to existing content:
2. Group the multiline in a group by itself, then add the following workflow when the multiline’s value changes: note that you need to reset the group as a second step.
let me know if you face any issues.
Thank you so much! It worked
I made changes to my app and struggling to make this work.
Can I send you a video?
@hirayaleads yes please do share a video or a read only link and I’ll do my best to help
This topic was automatically closed after 70 days. New replies are no longer allowed.