Hi! I am trying to use a workflow to populate a te...
# suiteflow
m
Hi! I am trying to use a workflow to populate a text field with values from a multi-select field. On the first attempt I was able to get the field populated just using the multi-select fields internal ID. However, it came out looking like this... Anyone know what I need to do to change this? At the minimum I'd like to at least replace the characters with commas, ideally I'd like just the item numbers as comma separated.
k
Mine did this when I concatenated - if I removed concatenation it solved the issue.
when are you doing the field sourcing?
m
Sourcing is after record submit. I didn't try any concatenating I just used the field id in the formula field.
k
Can you do the sourcing before record submit and use a client event? I was able to make this work.
(nlapiLookupField('customer',nvl(nullIfEmpty(nlapiGetFieldValue('entity')),-1),'custentity_po_free_ship_methods',false).concat(',')).indexOf(nlapiGetFieldValue('shipmethod').concat(','))>=0
That is plugged into the criteria field of an action in client - and it's comparing against the ship method.
so if we pull out all my comparison stuff...
(nlapiLookupField('customer',nvl(nullIfEmpty(nlapiGetFieldValue('entity')),-1),'custentity_po_free_ship_methods',false)
That's pulling the value of my "free ship methods" field from the customer.
m
You went over my head on this. 🙂 We still talking about a workflow or do I need to look at a script?
k
Hybrid. Using script within workflow
m
So I've been trying to find more on this to make sure I understand. But I think I'm still lost, sorry. Are you putting that code somewhere within a workflow field or is it a script triggered by a workflow?
k
It would go in where you set the field value instead of just the field reference
m
Ok, so I'm sure I botched this...I'm getting an ERROR: Invalid Expression (nlapiLookupField('item',nvl(nullIfEmpty(nlapiGetFieldValue('item')),-1),'custitem_ifd_suggested_sub',false)
k
Put your desired field in a criteria... And then switch from builder to custom formula
It should give you better idea how to fill out
m
Thank you for your time and assistance!!