web stats
File Writer SQL (No JS) - Get Channel Name & Directory? - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 12-16-2013, 10:42 AM
r.burnham r.burnham is offline
Mirth Newb
 
Join Date: Mar 2013
Posts: 9
r.burnham is on a distinguished road
Default File Writer SQL (No JS) - Get Channel Name & Directory?

Edit: Titled this incorrectly, would be misleading in searches. Delete please?

Last edited by r.burnham; 12-16-2013 at 10:53 AM.
Reply With Quote
  #2  
Old 12-16-2013, 11:54 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,126
narupley is on a distinguished road
Default

Do you mean a File Writer or a Database Writer? Because those settings seem to be conflicting, unless you're writing out a .sql file or something.

In 3.0 you can programmatically get the name of a channel with ChannelUtil.getDeployedChannelName(channelId). As for the destination path/filename, you can use a variable in those fields instead (e.g. something in the global channel map set in the deploy script), and then reference that variable later on.
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #3  
Old 12-16-2013, 12:07 PM
r.burnham r.burnham is offline
Mirth Newb
 
Join Date: Mar 2013
Posts: 9
r.burnham is on a distinguished road
Default

I ended up putting up a new thread, but what I had meant to ask was: From inside a database reader using SQL-only (no javascript), can you get the name of the channel? Mirth 2.2
Reply With Quote
  #4  
Old 12-18-2013, 06:35 AM
r.burnham r.burnham is offline
Mirth Newb
 
Join Date: Mar 2013
Posts: 9
r.burnham is on a distinguished road
Default

For anyone searching: I never found out and ended up going to javascript on the db reader.
Reply With Quote
Reply

Tags
file writer

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 07:29 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation