How to use script for picklist

  • 618 Views
  • Last Post 31 July 2018
  • Topic Is Solved
Steph posted this 24 July 2018

Hello Scanshare team,

I have to do a picklist based on an XML file.

The value to display in picklist is a node's attribute, so it seems that is not possible with the standard XML list type.

Example:

<service serv='AILED'>
        <patient id='1'>
            <nom>XXXXXXXX</nom>
            <prenom>NNNNNNNNN</prenom>

 

The requested value in list is AILED. (Find the complete xml file attached)

 

So i imagine that it is possible with script list type.

I've read in Help that RESULT must be used to return the picklist values with semi colon as separator.

I did the script attached.

When i run this script directly from Windows (with line 14 enabled), the message box returns correctly for result:

AILED;AILEG;AMBU;CHIM;EXT;

 

When this script is ran from the picklist list test (with line 14 disabled) , no value is returned.

Maybe i don't use RESULT correctly.

Could you help me on this question?

Best regards

Stéphane

 

 

 

 

Attached Files

Order By: Standard | Newest | Votes
luca.scarpati posted this 25 July 2018

Hi Stéphane,

 

your script is perfect (of course you have to delete or comment line 14) and it works great laughing.

 

What problem do you have with the result? Have you tried to do a "Show List Results"?

 

Best regards,

Luca

Steph posted this 25 July 2018

Hi Luca,

 

Good to hear that my script is OK smile, but the result is 0 of 0 on my installation cry

The product is Capture & Store v4.9.0

Best regards

Stéphane

 

 

Attached Files

luca.scarpati posted this 25 July 2018

Hi Stéphane,

 

thanks for the screen, I think you use Internet Explorer or Edge eheheheh laughing.

 

By default it blocks some javascript or calls to script (it is know), so I suggest you try another browser e.g. Chrome and you'll see that everything will work innocent.

 

Best regards

Luca

Steph posted this 25 July 2018

Hi Luca,

 

The screenshot was from Firefox, unfortunately, the issue is the same with Chrome...

luca.scarpati posted this 25 July 2018

Hi Stéphane,

 

mmm strange then something happens when reading your .xml file.

 

Please send a request to support@scanshare.com with the workflow, the script and the .xml file.

 

Best regards

Luca

luca.scarpati posted this 31 July 2018

Update after opening the ticket

The origin of the empty list was due to the failure to change the path of the xml file within the script.

Remember to always change the path innocent

 

Best regards

Luca

Steph posted this 31 July 2018

Hello,

 

That's it!

When running the script manually, the relative path to the XML file is enough.

But when Capture & Store runs the script, the absolute path to the XML must be used.

 

Thanks for support

Stéphane

Close