PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → Dynamically assign Variable to a Edit Control name in code
Dynamically assign Variable to a Edit Control name in code
Débuté par ahmad abbas, 20 fév. 2018 19:38 - 2 réponses
Posté le 20 février 2018 - 19:38
Details of the request:
I have an edit controls called EDT_Prompt1_Desc EDT_Prompt2_Desc ,EDT_Prompt3_Desc etc.. until 9

In the code i need to Save parameters form these control using a For Loop

SWITCH MNum

CASE "11"
FOR i = 11 TO 14
//Menu 1
FOR h = 1 TO 9
gclMyconnect.WriteTransaction(gsTranslist,"EDT_SMChoice"+MNum,"Description",EDT_Prompt1_Desc..Value)

Is it possible to make the value 1 replace with value 4 as it did for the String variable "EDT_SMChoice"+MNum,"
Posté le 21 février 2018 - 11:36
Hi

Yes it is...
look at 'indirection' in the help...

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

Ready for you: WXShowroom.com, WXReplication (open source) and now WXEDM
(open source)

More information on http://www.fabriceharari.com


Le 2/20/2018 à 1:38 PM, ahmad abbas a écrit :
Details of the request:
I have an edit controls called  EDT_Prompt1_Desc  EDT_Prompt2_Desc
,EDT_Prompt3_Desc  etc.. until 9

In the code i need to Save parameters form these control using a For Loop

SWITCH MNum
    CASE "11"
        FOR i = 11 TO 14 //Menu 1
          FOR h = 1 TO 9
gclMyconnect.WriteTransaction(gsTranslist,"EDT_SMChoice"+MNum,"Description",EDT_Prompt1_Desc..Value)


Is it possible to make the value 1 replace with value 4 as it did for
the String variable "EDT_SMChoice"+MNum,"
Membre enregistré
28 messages
Popularité : +2 (2 votes)
Posté le 21 février 2018 - 11:40
I am not sure wat you meen but I guess indirection?

You can use:
{"EDT_Prompt"+MNum+"_Desc",indControl}..Value