Dec 01, 2024 09:55 AM
I'm trying to create an automation to deselect the option 'language' from the multi-select field 'todos' in the table 'Post'
I'm doing this through a combination of automation and scripts.
I'm new to scripting and put together this by looking at some examples from the community and asking ChatGPT, but it's still not working.
Anyone so kind to give it a pass and point me in the right direction?
Dec 01, 2024 11:03 PM
If you're open to a non-scripting solution, I'd suggest creating a formula field that outputs the values of the multiple select field, except it also removes the word 'language'. You can then get the automation to paste the value from that formula field into the multiple select field and it'll do what you want
If you want to use a script for this, I'd suggest reviewing the docs yourself so that you can ask for corrections to be made. Also try feeding the docs to your LLM of choice to try to get something working out of it, and also break out your code requests into little snippets that you can test. For example, first get it to update the select field with an option of your choice, then get it to remove an option, etc etc
From what I can see of your code, it doesn't come close to what you're trying to do, so I'd suggest starting a new chat entirely instead of trying to fix your current one
Dec 02, 2024 02:25 AM
Hi,
This is a case where level of chatGPT over-engineering can be described as very close to "sh*t-coding" 😁 (sorry)
If you need to remove 'language' from the whole field, or from given part of records which you can filter, and you want to do that as one-time action, you can create a formula with substitute, as @TheTimeSavingCo advices, but you might have problems with comma when a 'language' is last selected option in the list.
A solution, easier for beginners, is to duplicate the field, enter duplicate field settings and remove that option. Then copy-paste whole field back from duplicate to original field. You can filter records before copy-pasting, so the operation will only affect visible records.
If you really need this to be done as part of automation, I think this example is clear. Don't forget to change word 'Scripting' to your option 'language'