Using BPM to fill text field

Hi All,
I am trying to create a method directive, when “Material Certificate 2.1” box gets checked and when the order is saved, the comments fields get populated with default text specified in the directive.




I am able to achieve that, but I if want to edit text after it gets populated, it goes back to the default value, is there a way to edit text after it gets filled?
Thanks

Add another condition for field not equal to your default value.

Thanks @gpayne , should that be placed after the set field?

No, it will be part of the current condition.

Can be a simple field is = string.Empty so your routine fires only if the field is empty, so you can make changes afterwards

Or you can use a Number of rows in the query is less than 1 and do a matches for some part of your comment, but then you have to append the comment to the existing field rather than just set the field.

1 Like

Thanks @gpayne
So if I check “Material 2.1” box, the comment box should contain “2.1 Cert and Spec sheet required” and if the user adds any additional text to the comment field, it should contain both strings.
And this can be achieved using append?

Yes, If you do not find the 2.1 Cert phrase then set the field to the 2.1 Cert phrase + OrderDtl.OrderComment. I could also add a carriage return \n

@gpayne Did you mena something like this?

I think it works now. Thanks

1 Like

@gpayne is it possible to fill and append the text field based on number of checkboxes checked. I have created the solution, but there are too many conditions.

You can make a query and just use one condition
image
The query can be as complex as needed.
image

If you are updating all of those fields then you may want to try the Update Table by Query widget to run the query and do all of the updates in one widget.

1 Like

@gpayne
I tried using Update table by query widget but it doesn’t work. I created a test to see if this works correctly.
The goal here is to get Certificate of conformance box checked all the lines(specified criteria as company and current order), it should get checked on all lines. When I click on one line to enable it, it did gets enabled and cannot be turned off which is right but it doesn’t get translated to other lines.
I believe once this gets working, I can use the same logic on the comments fields as well.






If the checkboxes apply to all of the lines should they be put on the order header and then make the comments for each line in the order when the header is saved? Or copy them to the lines?

Copy to all lines, not on the header level.
Can all lines of OrderDtl table be access by query that was created?
image