In a form I have a repeat that outputs several results (they happen to be single sentences) from a serverConnect Server Action. Typically there could be anything from 3 to 12 sentences.
My aim is to put these sentences into a Medium Editor Textarea so they can be edited by the user and uploaded to a single database field.
The only way I can think of doing this is to add a variable before the repeat. Then inside the repeat put a {{var_comment.setValue(commpara_text)}} BUT I only get one of the paras in the variable. How can I concatenate the sentences?
In other languages I have used things like += āconcatenate to the existing valueā and not to overwrite.
This variable can then be used in the Medium Editor Textarea using something like dmx-bind:value="var_comment.value"
Maybe I am overthinking this but I just canāt get anything to work, please help.
This needs to be client side as the result of the repeat is determined by user selection in the form.
I am working in SPAs
Hi @Teodor, I didnāt know that before and yes that will be useful in other areas.
Unfortunately that doesnāt solve this issue. I donāt want all the values returned by the query (B), I only want those that are shown in the repeat (A) ie lines 4, 9 and 14 in the example below.
You are right it does. The ācodeā within the repeat determines which paragraphs to show. I tried using the same ācodeā in the Medium Editor but nothing worked.
So you have a repeat that loops through all the records but inside it you use some conditions in the value expression that show certain records from all the records in the repeat?
You cannot use a repeat with these expressions as a medium editor value ā¦
The question here is - why do you āfilterā your data like that, and not filter the repeat/query for this?
Hi @Teodor, I have managed to get this to work with one where condition, BUT I need to apply 3 conditions. Can I nest where clauses? Or can I daisy-chain where clauses?