Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have 3 fields, there are Country, City, Geo.
Country: USA,Russia,China,...
City: New York, Shanghai,...
Geo: Russia,New York,Usa,Shanghai,..
I want to select the values(which possible in Country or City) in Geo.
set v_Geo=ActiveDocument.Fields("Country").GetPossibleValues
Is it possible =>
add ActiveDocument.Fields("City").GetPossibleValues into v_Geo?
then ActiveDocument.Fields("Geo").SelectValues v_Geo
Hi,
Please, check if the application attached solves your problem.
Regards,
Thank you Erich.
Anyway, I would like to know how to combine 2 variables values into 1.
You can create a variable for your case like this (go to document properties -> Variable overview ->Add
vSelections ='(' & concat(DISTINCT CHR(34) & COUNTRY & CHR(34), '|')
& IF( COUNT(DISTINCT COUNTRY)>0,'|') & concat(DISTINCT CHR(34) & CITY & CHR(34), '|') & ')'
Dear Erich, can it be achieved in Macro?
Probably this.
set field = ActiveDocument.Fields("Geo")
field.selectValues ActiveDocument.Fields("Country").getPossibleValues
field.selectValues ActiveDocument.Fields("City").getPossibleValues,true