Page 1 of 1
concating the names of custom property
Posted: Fri Jul 15, 2016 12:16 pm
by samjith
Hi,
1. i have a custom property with name x_interval_val in card i
2. item 1 of chunk_text contains x
is there any way to produce the result by?
put the (item 1 of chunk_text & "_interval_val") of card i into var
instead of doing
put the x__interval_val of card i into var
Thanks
Re: concating the names of custom property
Posted: Fri Jul 15, 2016 1:36 pm
by Klaus
Hi samjith,
you need to use a variable for the CP name like this:
...
put item 1 of chunk_text & "_interval_val" into tVar1
put the tVar1 of card i into var
...
If a variable contains a valid custom property name, then this will work!
Best
Klaus
Re: concating the names of custom property
Posted: Mon Jul 18, 2016 11:02 am
by samjith
Hi Klaus,
is there any other method for doing this?
i have 100s of custom property in a card.
can we use functions to doing the same thing?
Thanks
Samjith
Re: concating the names of custom property
Posted: Mon Jul 18, 2016 11:45 am
by Thierry
samjith wrote:
is there any other method for doing this?
i have 100s of custom property in a card.
Hi Samjith,
one way to get all your custom properties:
Code: Select all
put the customproperties of me into myArray
repeat for each line K in the keys of myArray
put K & ": " & myArray[ K] &cr after T
end repeat
put T
then, do as Klaus said...
HTH,
Thierry
Re: concating the names of custom property
Posted: Mon Jul 18, 2016 12:28 pm
by samjith
Hi Thierry,
Good idea!
Thanks
Samjith