cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1256
Views
10
Helpful
11
Replies

WCC Functions

phani venigalla
Level 1
Level 1

How to Find the length of Collect digits and Substring functions in WCC Flow Editor

2 Accepted Solutions

Accepted Solutions

Arunabh Bhattacharjee
Cisco Employee
Cisco Employee
You can use the length filter using pebble

{{ digitString | length }}

View solution in original post

Hi Phani for the date time manipulation you can use the DateTime data type

This video may help you with working with time of day in flow: 

https://app.vidcast.io/share/7823992c-68b8-46be-9c3d-15ac3476f1d3

Some other resources:

For Pebble methods etc - you can refer the official documentation:  https://pebbletemplates.io/

There is an unofficial Pebble Parser app that is a cold start (it is hosted for free, takes 30 seconds to start)

Pebble parser learning App - https://pebble-parser.herokuapp.com/

To learn more on how to use it go to Info > About 

It throws the full stack trace for debugging so is easier to debug while manipulating data inside flow.

 

Thanks & Regards,

Arunabh.

 

View solution in original post

11 Replies 11

Arunabh Bhattacharjee
Cisco Employee
Cisco Employee
You can use the length filter using pebble

{{ digitString | length }}

Thank you!, is there a document for all the Java script functions , Like Compare, We also have a requirement to compare and convert the date format from MMDDYY to YYYYMMDD, since the date comes from webservices as YYYYMMDD.

Hi Phani for the date time manipulation you can use the DateTime data type

This video may help you with working with time of day in flow: 

https://app.vidcast.io/share/7823992c-68b8-46be-9c3d-15ac3476f1d3

Some other resources:

For Pebble methods etc - you can refer the official documentation:  https://pebbletemplates.io/

There is an unofficial Pebble Parser app that is a cold start (it is hosted for free, takes 30 seconds to start)

Pebble parser learning App - https://pebble-parser.herokuapp.com/

To learn more on how to use it go to Info > About 

It throws the full stack trace for debugging so is easier to debug while manipulating data inside flow.

 

Thanks & Regards,

Arunabh.

 

Hi Anurab,

In flow designer Collect digits node , how do we set retries if no entry or no match.

Thanks,

Phani

You can refer the advanced settings in the node. No input timeout and unmatched entry are already exit blocks.
So you can increment a counterVariable that stores how many times you want to retry the operation and loop back,
That would be a standard counter and Set Variable counter to {{ counter + 1 }} and then a conditional block.

Hi Arunabh,

i am trying to access the length of the json array response(like number of Transactions) with json path expression "$.length" but, it is not working in the parse element of webex flow designer. We are taking the https json response to variable and taking the length.But its not getting the length.

Help appreciated.

Thanks,

Phani.

Hi
I have written this below function in Setvariable. I could parse in PebbleParser and in SetVariable Expression as well. However when i assign to Variable i am getting synatx error. Getting "Variable value cannot contain spaces. double quotes and line breaks etc..." : Help me what wrong on this sysntax.
{% set k=k_str3  | replace({"Date(" : ""}) | replace({")" : ""}) %}{% set l=k |slice(0,k.length()-5) %}
{{l | trim()}}

Date(1659589200000-0500)

Output : 1659589200000

Hi Arunabh,

How do i convert the date comes from API 

/Date(1656689365077-0500)/ to MMdd format?
Pl let me know the input format of that Date to be converted.
 
Thanks,
Phani.

phani venigalla
Level 1
Level 1

Hi Arunabh,

i am trying to access the length of the json array response(like number of Transactions) with json path expression "$.length" but, it is not working in the parse element of webex flow designer. We are taking the https json response to variable and taking the length.But its not getting the length.

Help appreciated.

 

For some reason Parse element is not working. trying to access the data out of JSON response.

The JSON path expression which is gtting $.lenght same function is not working in WCC parse element.