Related To The Custom Symbol Implementation

Here is the code through which i am trying to execute the custom symbol. But somehow, I am not that familiar. Whereas I am getting an error like

 

Content:

: "The following ParentIds were not executed due to a circular or non-existent dependency: 1." 

 

"Some JSON paths did not select any tokens: $.1.Content.Links.Value."

 

Could someone help me with writing the correct code?


screens.png

1.png

  • Hi

    I just had a quick glance at your code, but the circular reference is that you refer to the output of the batch call 1 from within the query of the batch call 1, and you also have ParentIds 1 set. If you're going to reuse the outputs from the first section in the batch call, you need to do that in a 2nd (or upcoming) section.

    body = {				
    	1: {
    	Method: "POST",
    	Resource: deleteValue ? "{0}?updateOption=remove" : "{0}",
    	Content: JSON.stringify(data),
    	Headers: {
    	"Content-Type": "application/json",
    	},				
    	ParentIds: ["1"],
    	Parameters: ["$.1.Content.Links.Value"],
    	},
       };

    Also, no need for a batch call if you're only executing one query, I guess.

  • This is last query from my side Can you please help me overcome with this? Like followed you completely and exactly what you have said. Can you please help me last time with this error.

    var dateTimeString;

                var data;

     

                if (userLang == "pt" || userLang == "pt-BR") {

     

                    var dateTimeSplit = datastream.Time.split(' ');

                    var dateSplit = dateTimeSplit[0].split('/');

                    var timeSplit = dateTimeSplit[1].split(':');

                    dateTimeString = new Date(dateSplit[2], dateSplit[1] - 1, dateSplit[0], timeSplit[0], timeSplit[1], timeSplit[2])

     

                    data = {

                        "Timestamp": dateTimeString.toISOString(),

                        "Value": datastream.Value.replace(',', '.')

                    };

                }

                else {

                    data = {

                        "Timestamp": datastream.Time,

                        "Value": datastream.Value

                    };

                }
    image.png

  • Perhaps try with yyyy-MM-dd hh:mm:ss? But, when in doubt, I always look towards Invariant Culture for defining timestamps.

  • I have experimented with different formats, but it's still not working for me. It seems to be working fine without the timestamp. But this is not accepted can you please help me with some formatted code to try.Slight smile

  • It's correct that it's taking yyyy-MM-ddThh:mm:ssZ, but I am currently doing it manually. I will let you know, thank you so much. If you can create a code, it would be very helpful. In the meantime, I am also trying to do it.Slight smile

  • I don't think I have example code readily available for this, but please try with yyyy-MM-ddThh:mm:ssZ instead. The Z indicates Zulu, which is GMT so you'll need to replace it to indicate how many hours away from GMT you are. F.ex. -07 or +03