How can I do this mapping? GL_BS_MAP can be in the format of 11111 or 11111-222. JOURNAL_ENTRY is in the format of 111-222-33333-444. Therefore, if GL_BS_MAP has a length of 5, I want to use LOOKUP('LEVEL0', 'GL_BS_MAP', mid(JOURNAL_ENTRY, 9, 5), 'BS_MAP') for my mapping, but if GL_BS_MAP has a length of 9, I want to use LOOKUP('LEVEL0', 'GL_BS_MAP', mid(JOURNAL_ENTRY, 9, 9), 'BS_MAP'). However, Qlikview prevents me from even checking the len of GL_BS_MAP because it is not in the FERMAT table. How can I go about doing this? Thank you