Home > Forum > Forms > Solution -> [CLOSED] Q: How to get the name of an ItemList within a SELECT statement?

Solution -> [CLOSED] Q: How to get the name of an ItemList within a SELECT statement?
2

MVP

Good evening everyone,

I'm looking for a way to get the name of an ItemList within a SELECT statement.

I'm planning to build a way to move an ItemList row to another ItemList in the same instance.
Therefore I need an autocomplete field with ID=ItemListID(DET_WFCONID) and Name=? .

I'm kind of stuck.
At the moment I can't even find it under (https://developer.webcon.com/2022/resources/db/).

Anyone out there for a little help?
Thanks in advance,
Bjoern

MVP

Hi Björn,

the column of foreign key (DET_WFCONID) often is a abbreviation of the table.
WFCON refers to WFConfigurations

So you get the name in the designer using:
SELECT [WFCON_ID]
,WFCON_Prompt
FROM [dbo].[WFConfigurations]
where WFCON_ID = 4687

If you want to take translations into account


select isnull(
(
select Trans_name
from Translates
-- Trans-ObjId See table DicTranslationsObjects
where TRANS_OBJID = 11
and TRANS_ELEMID = 4687
and TRANS_LANID = (select LAN_ID from TranslateLanguages where LAN_Name = 'de-DE')
and Trans_name <> ''
)
, (
SELECT WFCON_Prompt
FROM [dbo].[WFConfigurations]
where WFCON_ID = 4687
)) as Translation

Best regards,
Daniel

MVP
In reply to: Daniel Krüger (Cosmo Consult)

Hi Björn,

the column of foreign key (DET_WFCONID) often is a abbreviation of the table.
WFCON refers to WFConfigurations

So you get the name in the designer using:
SELECT [WFCON_ID]
,WFCON_Prompt
FROM [dbo].[WFConfigurations]
where WFCON_ID = 4687

If you want to take translations into account


select isnull(
(
select Trans_name
from Translates
-- Trans-ObjId See table DicTranslationsObjects
where TRANS_OBJID = 11
and TRANS_ELEMID = 4687
and TRANS_LANID = (select LAN_ID from TranslateLanguages where LAN_Name = 'de-DE')
and Trans_name <> ''
)
, (
SELECT WFCON_Prompt
FROM [dbo].[WFConfigurations]
where WFCON_ID = 4687
)) as Translation

Best regards,
Daniel

⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣀⣀⣀⠀⠀⠀⢀⡤⠤⠤⣄⠀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⣀⣀⠤⢴⣴⠒⠉⠹⣴⣏⠀⠀⠀⡀⠈⢇⠀⠀⣼⠀⠀⠀⠘⣶⠇⠀⢨⢃⡾⠓⠲⢤⠀⠀⠀⠀⠀⠀
⠀⠀⠀⣀⠤⠔⠒⠙⣯⣇⠀⠈⣿⣇⠀⠀⣿⣿⣿⠀⠀⣷⠀⠘⡄⠀⣿⠀⠀⠀⠀⢹⠀⠀⢸⡏⠇⠀⢀⠇⣀⠤⠒⠒⠤⣄
⢰⡖⠉⠀⠀⠀⠀⣀⣸⣿⠀⠀⠉⠉⠀⠀⢸⠁⣿⠀⠈⠉⠁⠀⢱⠀⣿⠀⠀⣦⠀⠀⠀⠀⣿⡸⠀⠀⠘⠉⠀⠀⣀⣤⣴⠟
⢼⢣⣀⣴⡀⠀⠘⡿⠏⠗⡆⠀⠠⣶⡆⠀⠸⡄⡏⠀⠀⣶⣷⠀⠀⢧⣿⠀⠀⣿⡆⠀⠀⢸⣿⠃⠀⢰⡄⠀⠐⡿⠛⠋⠀⠀
⠘⢿⡿⢿⣧⠀⠀⢳⠀⢸⠸⠀⠀⢹⣧⢀⣀⣷⣧⣤⣤⠛⣏⣦⣤⣾⣿⢦⣤⣿⢸⣄⣀⣼⡏⠀⢠⡟⡇⠀⠀⡇⠀⠀⠀⠀
⠀⠀⠀⠀⢏⢇⠀⠀⣣⠀⣆⣷⣶⣿⣿⡿⠿⠿⢷⡿⠟⣠⠟⠋⠛⢿⡛⠛⠿⡼⠿⠿⢿⣿⣿⣶⠞⡅⢸⠀⠀⢸⠀⠀⠀⠀
⠀⠀⠀⠀⠘⣾⣿⣿⠇⢠⣟⠉⠙⠷⡿⠀⠀⠀⢸⢀⡼⠁⠀⣀⠀⠀⠹⡄⡼⡇⠀⠀⡜⣸⡏⠙⠢⣧⣾⣦⣀⢸⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠈⠀⠀⠀⢿⣿⣷⣦⡀⠀⠀⠀⠀⣇⡾⠀⠀⣼⣿⢷⠀⠀⢻⢱⠀⠀⢀⣿⡿⠀⠀⢠⠋⢻⡿⠿⣏⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠳⣿⣿⠆⠀⠀⢸⡏⡇⠀⠀⡏⡟⡟⠀⠀⢸⡸⠀⠀⢸⣿⠃⠀⠀⡜⡰⢩⠃⠀⠈⣱⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⢹⠀⠀⠀⢸⠀⡇⠀⠀⠙⠋⠀⠀⢀⡏⡇⠀⠀⠘⠋⠀⠀⣰⣱⢣⠇⠀⠀⣰⠃⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡘⡎⠀⠀⠀⡏⣿⣧⡀⠀⠀⠀⠀⢀⣾⣷⡇⠀⠀⠀⠀⠀⢠⣯⣧⣾⣦⣄⣰⠃⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣧⣧⣤⣶⣶⠃⠘⢿⣿⣷⣶⣶⣾⠟⠉⣿⣿⣦⣄⣀⣠⣴⢏⣽⠋⠉⠙⢿⠁⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠛⠛⠛⠋⠁⠀⠀⠀⠉⠉⠉⠉⠀⠀⠀⠈⠛⠻⠿⠟⠋⠁⣿⣿⣦⣀⣀⡼⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⠛⠛⠛⠁⠀⠀⠀⠀⠀⠀⠀