Can you change a quota count with JavaScript | XM Community

Can you change a quota count with JavaScript

  • 29 January 2022
  • 6 replies
  • 110 views

Userlevel 4
Badge +14
  • Level 5 ●●●●●
  • 133 replies

In my survey, I have overall categories of A,B,C,D,E,F - and I have quotas for each overall category.
Each respondent answers the category section 3 times, BUT they are allowed to answer about the same overall category MORE THAN ONCE.
e.g. there 3 categories might be A,A,B or C,C,C or A,B,C.
If they do answer about a category more than once, then I would want that quota count to increase by the number of times they answered about that category.
Is this possible? Perhaps with JavaScript?
Many thanks


6 replies

Userlevel 4
Badge +14

Also, can I pick up what a particular Quota Target is using JavaScript or piping? It seems like I can pick up the Quota Count, but not the target??

Userlevel 1
Badge +4

I’m in a similar boat, and need a way to increase the quota count by more than 1 for a given response.

Userlevel 4
Badge +14

I’m in a similar boat, and need a way to increase the quota count by more than 1 for a given response.

Hi @rbjak  - I struggled with this and Support, at the time, said it’s not possible to increase the quota count by more than 1 for a given response, so in the end what I did was have multiple quotas for each “quota”.

e.g. for “Quota A” I had “Quota A1”, “QuotaA2”, and “QuotaA3”.

I then used embedded variables to sum the 3 versions to give “Quota A Total”, and compared it to an embedded variables “Quota A Target”.

Does that make sense?

Userlevel 1
Badge +4

@MikeW Well, that’s pretty clever.  How is that working out for you? 

 

I have a dozen quotas I’d need to configure (timed entry for an event with multiple attendees counting against the quota), and I wonder what the overhead would look like with dozens of quotas being summed and compared.

Userlevel 4
Badge +14

@MikeWWell, that’s pretty clever.  How is that working out for you? 

 

I have a dozen quotas I’d need to configure (timed entry for an event with multiple attendees counting against the quota), and I wonder what the overhead would look like with dozens of quotas being summed and compared.

 

Sorry @rbjak - I didn’t see your response.

I had dozens too. It worked really well. In terms of generating the necessary syntax for any calculations/ sums etc. I recall I did most of it in a text editor and/or Excel.

I copied all of the necessary IDs from Qualtrics IDs and then wrote the syntax offline using a text editor/ Excel formulas etc and then copied into Qualtrics in the relevant places.

 

 

Userlevel 1
Badge +4

The “Qualtrics” IDs looks like an incredibly helpful feature; thank you for pointing it out.  I’m glad to hear things worked well for you, I’m going to give this a go.

Leave a Reply