Originally Posted By: splinny
$did(name,id)


Thank you!

Originally Posted By: me

Code:
on *:dialog:TAIR:sclick:22: {
 write example.text $did(TAIR,14) $did(TAIR,13)
 write example.text $did(TAIR,17)


Is working great for the time being, Is there a way to set "example.text" or the file name to a variable?

For example if field 20 is a date and field 25 is the customer Could i tie these to be the file name?

I tried:
Code:
write $did(TAIR, 20) $+ _ $+ $did(TAIR,25).txt $did(TAIR,14) $did(TAIR,13)


Also,

Code:
write ($did(TAIR, 20) $+ _ $+ $did(TAIR,25).txt) $did(TAIR,14) $did(TAIR,13)


and,

Code:
write $did(TAIR, 20) $did(TAIR,25).txt $did(TAIR,14) $did(TAIR,13)


Any further assistance would be great as well.



Okay figured out the variable thing, but still struggling to get the write command to take it. Currently I have this:

Code:
alias filename {
var %date = $did(TAIR,24), %customer = $did(TAIR, 29), %myFile = %date $+ _ $+ %customer $+ .txt
}

write %myFile $did(TAIR,14) $did(TAIR,13)



when i echo the alias section i am getting the DATE_CUSTOMER.txt but when it is used in the write i am getting field 14 as the file name and field 13 as the contents of the file.

any ideas?

Last edited by Ignant; 13/02/17 06:37 PM.