Skip to main content
Question

Pipeline Looping Through an Array

  • December 4, 2023
  • 0 replies
  • 222 views

Forum|alt.badge.img+2
  • Quickbase Alumni

Hi guys, I am new to Pipeline, and I need some help doing the following task: 

Loop through the first half of a text field containing many numbers separated by ";", and comparing each number to the record ID. It accepted the code but when I run it, this code popped up "Skipped because set values are the same as in source object." 

{% set array = a.j_classification.split(';') %}
{% set first_half = array | length %}
{% set first_half = first_half//2 %}
 
{% for i in range(first_half) %}
{% if array == a.id %}
{{1}}
{% endif %}
{% endfor %}


------------------------------
Jay
------------------------------
This topic has been closed for replies.

Forum|alt.badge.img+11

Can you post some sample data ?  I visualize you've something like 

ABC123 , you want to split it down the middle into ABC and 123 and then compare 123 to the record id of the record ? 

it can ABCDE12345, will it always be half the length ? never ABC13245 , since [Record ID#] keeps growing



------------------------------
Prashant Maheshwari
------------------------------