Developer forum

Forum » Integration » Automatic Digital Asset task working with If - Else logic

Automatic Digital Asset task working with If - Else logic

Barend Mosch
Reply

Hello there!

I've been experimenting with the 'Digital assets checkin on products' Integration scheduled task and to my understanding it works based on pattern defined on an Asset Category.

This works perfectly when defining one more fields in the pattern sequencially. Is it also possible to add some if else logic to the pattern?

For instance
For asset category images, I want to check on ProductID

If there no assets found with ProductID, then try to find any assets with ProductNumber


Is that possible?

Kind regards,
Barend Mosch


Replies

 
Michael Knudsen
Reply

Hello Barend,

- you kan separate the fields with ; (semi-colon) in the Pattern field, which will add assets based {ProductId} and/or {ProductNumber}. So you can end up with to assets, if there is a match on both.

{ProductId};{ProductNumber}

Br. Michael Knudsen

 
Barend Mosch
Reply

Hi Michael,

Thanks for the response!

Writing the pattern with ; works. This enables a simple OR logic. But I'm searching for exlusive OR, meaning either ProductID or ProductNumber, not both. 
If there is a match on ProductId, ignore searching on ProductNumber.

I found a workaround by creating some custom code, but might be an idea for this kind of logic to be standard in the definition on the pattern.

Cheers for the answer, have a good day!
Kind regards,

Barend Mosch, Bluedesk

 

You must be logged in to post in the forum