#Transform Text

4 messages · Page 1 of 1 (latest)

winged thorn
#

I am at a crossroads. The API returns me data in uppercase and lowercase, is there any way that the API returns me the data only in uppercase? It could be done from the Frontend, but the component I'm working on for some strange reason does not allow me to transform them to uppercase.

digital egret
#

You could use a beforeChange hook to uppercase the field before saving if you wanted to prevent future misalignments. You would need to write a small script to update the existing ones (ez to do).

Or you could use a beforeRead hook that transforms the text before it’s returned.

I would likely go with option 1 bc the compute would only need to be done on write, and never on read.

winged thorn
digital egret
#

Which part are you unsure of?