Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I need to copy the actual value of one field in a variable.
load * inline [
salesman , qty
paul , 10
peter , 50
Alan , 30
];
I put this values in a table
Now, if I select one Item in a table I would to copy the value of Salesman field
I selected in the variable . In this way I could to use the variable also ina a SQL
scrpt.
How to do this?
Thabk you .
Regards,
-
slash
HI Slash,
Heres the updated one. This only select one salesman and has verification if no salesman is selected.
I use this code in OnSelect Action of Salesman.
=SubField(GetFieldSelections(Field), ',', 1)
Hope this solves your problem
Regards,
Nadsky
Just one thing:
you have insert this code in API:
SET selectedValue = ActiveDocument.fields("salesman").GetSelectedValues
But I need the value comes from a TEXT BOX andnot from a Salesman Field..
Many Thanks for you BEST support
Regards
Slash
Hi Nadsky,
the applicatio wascorrect but I need to capture a value from a text box.
I select a salesman the valueis copued in a text object and I put from a TBLE BOX to a variable and not from a field ?
Please, could to update the code?
Thnks so much
Regards,
-------------
Slash
Hi Slash,
Please use this macro code:
sub mySub
Set myText = ActiveDocument.GetSheetObject("TX01")
Set v = ActiveDocument.Variables("new")
if myText.GetText = "-" then
msgbox("Please select a value")
else
v.SetContent myText.GetText, true
end if
end sub
The variable now get its value from the value of the textbox.
Regards,
Nadsky
Are you sure of this line::
if myText.GetText = "-" then
it doesn't work
Yup.. if you don't select any customer from the list box the text value of Text Object is a dash (-)
Please see attached file. It works !