Custom list json array empty

154 views
Skip to first unread message

Prachi

unread,
Mar 9, 2015, 2:26:19 PM3/9/15
to suppor...@runmyprocess.com
Hello,

I'm trying to get data in a custom list in json form then populate dropdown with that data.

This is the code I'm using to get the json:

$( document ).ready(function() {
var data = JSON.parse(id_company.getList());
alert(JSON.stringify(data));
});


This code is working in JS tester. In RMP js widget, this code returns an empty list array like this:

{"list":[],"valueField":"value","labelField":"label","listField":"list"}

The custom list is part of a custom widget and is included in the WI. Why is the list array not being populated?

Thank you!

Prachi
--


teknion.com <http://www.teknion.com>

<http://www.teknioncre8.com/> <http://www.facebook.com/Teknion>
<http://www.linkedin.com/company/teknion> <http://twitter.com/teknion>
<http://www.youtube.com/teknion>

Please consider the environment before printing this e-mail.

CONFIDENTIALITY NOTICE: This communication, including any attachments, may
contain information that is confidential and privileged. [It may constitute
non-public information and is intended to be conveyed only to the
designated recipient(s).] If the reader or recipient of this communication
is not the intended recipient, or you believe that you have received this
communication in error, please notify us immediately by return e-mail and
promptly delete this e-mail including any attachments without reading or
saving them in any manner. Any other distribution, copying or disclosure is
prohibited and may be unlawful. We accept no responsibility for changes
made to this e-mail or to any attachments after transmission from our
office.

Bidisha Das

unread,
Mar 10, 2015, 12:23:22 AM3/10/15
to suppor...@runmyprocess.com
Hi Prachi,
Would you let me know Where from are you getting the array of json? Composite API or Collection?

You can refer to the below links in case you are populating the list from Collection: 




Thanks & Regards
Bidisha

Prachi Raibagi

unread,
Mar 10, 2015, 9:00:13 AM3/10/15
to suppor...@runmyprocess.com
Hi Bidisha,

I want to get the json of a Custom List using the custom list id.  var data = JSON.parse(id_company.getList());

I am not using collection or composite api.

I don't understand why the list array is empty when this code is in JS widget. In JS Tester, it is returning json result.

Thanks.

Prachi

--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to a topic in the Google Groups "RunMyProcess Support Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/a/runmyprocess.com/d/topic/supportforum/iSUUOGrt2Jg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/CAMGV9zvp8uEHdfi7_M-cHpzKW1EkNes4R%3D%3DKyJWEMomnBV-apQ%40mail.gmail.com.







        

Bidisha Das

unread,
Mar 10, 2015, 9:22:12 AM3/10/15
to suppor...@runmyprocess.com
Hi,
Write the same code in post loaded script of the Custom list.It will show the output on launch of your Web Interface.

var data = JSON.parse(id_company.getList());
alert(JSON.stringify(data));



Thanks & Regards
Bidisha

Prachi Raibagi

unread,
Mar 10, 2015, 9:32:55 AM3/10/15
to suppor...@runmyprocess.com
That worked. Thank you!

Regards,
Prachi

--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to a topic in the Google Groups "RunMyProcess Support Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/a/runmyprocess.com/d/topic/supportforum/iSUUOGrt2Jg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.
Reply all
Reply to author
Forward
0 new messages