OK, here is the thing. I want to store property-value pairs and then later use this as a lookup table to feed the value into another function. This is what I came up with and I don't know how to fix the problem:
\documentclass{article}
\usepackage{expl3,xparse}
\ExplSyntaxOn
% Create a new sequence.
\prop_clear_new:N {\MyLookupTable}
\prop_put:Nnn {\MyLookupTable} {key1} {intermediate1}
\prop_put:Nnn {\MyLookupTable} {key2} {intermediate2}
\cs_generate_variant:Nn \str_case:nnF {xn}
\NewDocumentCommand{\DoSomething}{m}{%
\str_case:xnF {\str_fold_case:n{#1}}
{
{intermediate1} {Result~1}
{intermediate2} {Result~2}
}
{Unknown~intermediate}
}
\ExplSyntaxOff
\begin{document}
Test1: \ExplSyntaxOn\prop_if_in:NnTF {\MyLookupTable} {key1} {\DoSomething{\prop_item:Nn {\IconNameToUnicodeList} {key1}}} {key1~not~in~list}\ExplSyntaxOff ~However: \DoSomething{intermediate1}
Test2: \ExplSyntaxOn\prop_if_in:NnTF {\MyLookupTable} {key1} {key1~found} {key1~not~in~list}\ExplSyntaxOff ~And: \DoSomething{intermediate1}
Final: \ExplSyntaxOn
\prop_get:NnNTF {\MyLookupTable} {key1} {\answer} {TRUE: \DoSomething{\answer}} {FALSE}
\ExplSyntaxOff
\end{document}
I tried a \cs_generate_variant:Nn \DoSomething:m {V}
but LaTeX didn't like it and I am still not very familiar with the LaTeX3 structure.