Pesky Empty Position in Delimited String

I have an app that allows the user to pick serialized product, remove specific picks, then replace those picks.

I’m seeing an issue wherein the delimited string that stores these serialized product IDs is being left with an extra delimiter “;” at the start of the string if I remove all of the picked items and then pick again…

Here is a screenshot of the record history:

And here is one of the triggers for removing from the pick:


And here is one of the trigger for adding to the pick:

I’m sure there is a simple fix, but I can’t see it at the moment. Any suggestions welcome.

Tulip _ Player.pdf (291.9 KB)
Attached copy of printed Record History for additional context.

This is turning into a public journal…

Looking at my trigger for adding to the pick, I’m thinking that when I remove the last item from a pick it is not clearing the variable / table field, but is leaving it blank instead…this logic was created in LTS 8, so there has probably been a more concise way to do this that I don’t know about yet.

Hi @jmlowden were you able to solve this one? We could also try out your trigger logic on a newer instance to see if it’s truly an LTS8 issue, and debug with you.

For this please share a link to your app, and we’ll dig in. Let me know if you’ve already brought this up in Office Hours or a Support ticket.

On the last image you check your text value against null

link(value, ‘0’)=’0’

if your text value is empty but not null, it will be false. That results in an empty string, that is joined with ; and the current ID => ;currentID

You could try four solutions:

  1. use len(value) < 1 instead of link(value,’0’)=’0’)
  2. add a trigger before to clear the variable if it is empty text ( if value blank then clear variable)
  3. use the trigger if value blank and built two if else statements where you have the the corresponding action
  4. clear the text variables before they could possibly get a value assignet. make sure, it has a real value or is null but never an empty string

I would prefer 1. or 2.

1 Like

Indeed, I replaced the LINK() logic with an IF(LEN() expression and that solved for both null and emptystring scenarios. I’ll go back and see if we didn’t have that as an option in LTS 8 or this was just a miss.

We generally try to keep all of our actions in one trigger for step loops so we could maximize the number of records processed without additional user interaction to resume looping.

1 Like