Project and Portfolio Management Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Create request by webservice -> multi-value

Highlighted
Sascha Mohr_1
Esteemed Contributor

Create request by webservice -> multi-value

Hi,
I'm having difficulties filling a new request by webservice if a field should contain more than one value. The field definition in PPM is multivalue and I'm trying to pass the visible values separated by a semicolon. Still I get the error
Error 2: Error validating value "04;11" for field REQD.DATAFLOW: no valid data was found for drop-down list.

In the RT it's an auto-complete list with multivalue turned on.
What am I missing here?
7 REPLIES

Re: Create request by webservice -> multi-value

Hi,

Can you try hard-coding the values to see if your code accepts the data.

These are things I would try:

a) Send in one value (instead of multi value)and see if the code works
b) Hard-code the multiple values and try separating them using #@# - Example: 04#@#11

Even though you mentioned it is an auto complete list, I notice the error message says "drop down list". That seems strange.

- Nisha
Sascha Mohr_1
Esteemed Contributor

Re: Create request by webservice -> multi-value

Thanks for the quick response,
so far I tried
- visible;visible
- visible#@#visible
- hidden;hidden
- hidden#@#hidden

And each time the error message does reflect that, single-value works alright.
Somehow the webservice does not seem to recognize that I'm trying to pass multiple values. As if it was interpreting it always as a single string.

Re: Create request by webservice -> multi-value

How about trying

- visible;hidden
- visible#@#hidden
- hidden;visible
- hidden#@#visible

Also are you using .Net or Java as your programming language? I've used .Net to code and know you have to use arrays to store the data.

- Nisha
Sascha Mohr_1
Esteemed Contributor

Re: Create request by webservice -> multi-value

You were right with pointing out to use arrays. I'll have a java developer look into it.
Jyotir ++
Member

Re: Create request by webservice -> multi-value

Hi,

You will see the same issue when you will import the Requests using XML Importer with Multiple values in field.

To avoid this is issue you need to send two values in two steps..Like

abc_first_value
abc_second_value

this should work.I have tried this and it worked in my case.

Hope this will help you.

Jyotir
Sascha Mohr_1
Esteemed Contributor

Re: Create request by webservice -> multi-value

Yes, the syntax in Java is a little different, but that's surely the right way.
Sascha Mohr_1
Esteemed Contributor

Re: Create request by webservice -> multi-value

.
//Add this to "OnDomLoad" event