Questions?

They are answered by the XTRF community and our experts

0

XTRF Groovy Macro - How to compare numerical values with non-numeric value 'Hyphens'

burg 2 years ago updated by Bartosz Budzyński 2 years ago 2

How to check in XTRF Macros when value is a whole number or with decimal places and/or non-numeric values exists such as hyphens.

Example 1: Quote Value can be 0 
Example 2: Quote Value can be 0.00
Example 3: Quote Value can be -

0

How to add language-independent tasks to a Classic project via API?

Thijs Senten 2 years ago in API updated by Bartosz Budzyński 2 years ago 3

In the documentation for /projects/{projectId}/tasks it is specified that languageCombination is a required field, but what if there isn't one and I need to add a language-independent task?

0

A question for some group-think... Has anyone effectively used XTRF to track referrals?

mark 2 years ago updated by BURG Translations 2 years ago 1

We're trying to think about how to track referrals better and would love to use XTRF if that's possible. Has anyone done this effectively who is willing to share what they've done?

Thanks!

0

when i try to connect to a database using macro I get invalid address error

Ahmed Abd El Hameed 2 years ago 0

I try to connect to a database using xtrf macros and I get this error

invalid database address: jdbc:mysql://"HostIp:PortNumber"/"db name"

this is the code I am trying to connect to db with

try {
String url = "jdbc:mysql://host:port/"
String db = "database name"
String userName = "username"
String password = "password"

Connection conn = DriverManager.getConnection(url + db,userName,password)}
catch(Exception e){
return e.getMessage()
}

however the same code works fine on my machine when I try it on Intellij, is there something missing in my code ? 

0

How to send emails to users using the logged in admin email with macro

Ahmed Abd El Hameed 2 years ago 0

I want to create a macro that sends emails to users, the sender is the already logged in admin email and the recipients are the selected users i want. what class should I be using in order to achieve that ?

0

Delayed Receivables and Payables on Cash Flow Report

Ted 2 years ago in Home Portal 0

Image 2429

Can anyone tell me where the amounts for Delayed Receivables and Delayed Payables come from on the Cash Flow report?  I'm guessing they are receivables or payables that haven't been invoiced yet, but I don't have any support for this idea and can't find anything in the documentation.  Also, I'm seeing two lines for each of these categories where I'd expect them to be all summarized together.  Any information would be helpful!

0

I have a macro that checks a condition and I want it to mail the output to a static mail

Ahmed Abd El Hameed 2 years ago 0

My macro works just fine but I don't know how to make it send an email if the condition is true, can't seem to find the class responsible for sending emails and SendingEmailService seem to crash my macro , any help is appreciated.

thanks in advance.

0

Changing Client's Name in Smart Projects after creation using Macros

Ahmed Abd El Hameed 2 years ago updated by Dennis Rosenbaum 2 years ago 3

Hello , I am trying to change the client name after creating the smart project but it only changes from the outside not from the inside of the project dashboard 

Image 2411

Image 2412

is there anyway I can change it in both places ? I tried to setNameInternal and it didnt work aswell

here is my code

import com.radzisz.xtrf.utils.velocity.VelocityTagUtils
import com.radzisz.xtrf.model.project.Project
import com.radzisz.xtrf.service.CustomerService
import com.radzisz.xtrf.model.partner.customer.Customer




class ChangeClient {
    def list;
    def params;

    VelocityTagUtils utils = new VelocityTagUtils();

    ChangeClient(list, params){
    this.list = list;
    this.params = params;
    }
CustomerService customers = utils.getService("com.radzisz.xtrf.service.CustomerService")
Customer newCustomer = customers.getByName("DTest2")
def nameOfNewCustomer = newCustomer.getName()

    def runMacro() {
        String customerName
        
        list.each{Project project ->
            project.setCustomerInternal(newCustomer)
            project.getCustomer().setNameInternal(nameOfNewCustomer)
        }
    }
}

new ChangeClient(list, params).runMacro();


0

XTRF and MemoQ integration - can I create a project in MemoQ first and then link it to XTRF?

Is is possible to create a project in memoQ first and then link it to XTRF?
We have a scenario where clients have their own MemoQ Server and want to upload projects directly to our MemoQ server.
Can a project be created in XTRF from this?