assign code to have cells autocomplete?

hi all!
I have to build lists of variable items.
is it possible to define codes that consist of few numbers or letters linked to text snippets and - upon entering the code in a cell have calc autocomplete accordingly? so you only have to type specific abbreviations to generate the full length text entry

a bit like ascii-code, I suppose, only with letters not numbers, i. e.:
enter ‘LST’ - long sleeved shirt
enter ‘vns’ - V-neck-Sweater

(this is just an example in order to make myself clear, the original purpose is somewhat different.
I would really need to enter several digit codes in one cell and have the cell next to it auto fill in the meaning.
I just want to check if this can be done with libre office and how)
Grateful for any pointers!

You can define the wanted replacements under the Replace tab of AutoCorrect Options.... In addition you need to enable the usage of the replacement table under the Options tab.

A disadvantage may be that the replacements are then also made in cases (different documents e.g) where you don’t want them.

However, a more flexible way to do what you want would (imo) require user-programming.

[Edit 2021-07-22 about 10:25 GMT]
A raw example is now attached as announced in the comment below :
ask319015VariantCascadedValidity_1.ods
[/Edit]

…You an use your own macros for insert predefined texts into the cells… You can assign the macros to hotkeys, custom menu items, context menus and toolbars - in scope of a specific document or the whole application.

Keyboard (shortcut) assignments can’t be saved to the document. They can be saved to a .cfg file, but must be loaded then explicitly to get in force.
Am I wrong? (Practical experience missing; I don’t tamper much with hotkeys.)
Alternatives to the replacement table without hotkey specification are:
-1- Dedicated input column for the shorthand codes, Lookup-formula in the data column.
-2- Validation list.
-3- Specialised macro; the macro itself called by shortcut, actual result cotrolled with the help of an input box or (if not rejected as too complicated) with a keyboard listener.

Blockquote:
“A disadvantage may be that the replacements are then also made in cases (different documents e.g) where you don’t want them.”

That is true, totally escaped my notice.

Custom menu sounds good, but it would hold nearly 200 items,probably too much
…scrolling the day away…

Seems I am lacking vital vocabulary to ask the right questions - or understand the answers
thanks for trying to help me out!
I have never dabbled with macros, though, and am really out of my depth on this one

To check if I understand correctly:1-3 are seperate solutions, not steps of one solution, I take it

  1. I could split my long list: say, for a kind of zoo inventory I could create dropdown lists from A like Aardvark, Anteater… to Z as in Zebu, Zonkey, Zorilla (yup, a Zorilla IS a thing, freshly googled)
  • setting the range for each letter of the alphabet according to the number of entries for each one.

Can you place the source list on a different spreadsheet within the same documen?

(Edited your comment for better readability)
Missing a “1)” in your comment.
[]
Yes, the numbered lines list different approaches. Doing the macro thing away since you are lacking experience, and regarding that for menu items and validation dropdown lists/ranges 200 entries are by far too many, only the first approach is applicable, imo. Combining -1- with -2- as you seem to consider yourself is possible (a variant case of what I sometimes call cascaded validatity). No splitting needed.
[]
Yes. you can place the lookup table anywhere, and it’s good practice to put it on a separate sheet.
(If I can finish it within a few minutes, I will attach a little example.)

dear Lupp and Zizi, thanks for taking the time and your suggestions
trying to kill several birds with one stone and hoping to come up with a practical solution along the way, sorry if therefore my approach seems a bit jumpy
I looked into the autocorrection function once more on a related issue where I have to add tiny icons (5mm2) and from online tutorials I take it you can add images to autocorrection, in my calc version 6.4.6.2 the option “text only” is checked and greyed out, any idea how to untick the box?
thanks very much in advance

PS: would be neat to be able to store autocorrections in individual libraries, like a language, to be chosen when opening the document or to swap to manually when writing new tables or letters.
i. e. if you have a number of clients, say, farmers, and whatever,…dentists, you could define different sets of autocorrections and never worry to accidentally ask farmers to contemplate delighting their chickens by providing them with dentures - when you were trying to peddle vitamin-D enriched nutrients.

?workaround? as a possible solution for autocorrections designed for specific purposes but not wanting to apply those globally:
a) add a character up front or behind the abbreviation that you rarely use otherwise, but if you know your list of autocorrections/autotext by heart this will be easy to remember
b) make a new set of autocorrections chosing another language - but you have to remember which language you used as a category for which group of correction/auto text sets…

if you open a new document, switch to …i. e. Hungarian dentists, French chickens…you check ‘for this document only’, you should be sorted
what do youse think?

You can start LibreOffice with different user profiles How to set the parent path for a specialized user profile see Starting LibreOffice Software With Parameters (example -env:UserInstallation=file:///tmp/test)
You may create links to soffice.exe containing your respective parameters, but file-type associations aren’t aware of a choice.
Concerning the original question I would actually advise to use the combined solution I demonstrated already in the .ods attachmed to my answer by editing.
To get it even more automated (no need to click on the validity dropdown arrow) you would need user code. Comes with disadvantages!

dear lupp, I cannot seem to find your attachment

found it now, thanks!