Workflow to Update a single field - Possible?

Hi

Just a short question regarding workflow.

We use it fairly extensively but in all cases the actions are based on conditions in different fields.

We have a situation whereby a team member uploaded some new accounts and incorporated the ‘Limited’ or LTD or plc suffix into the company names where they existed in the originating mailing list.

So we have Account Names such as ACME Rubber Limited. Our standard is to omit these suffices, so that any campaign uses the familiar account name such as ACME Rubber via the e-mail template. This looks much more professional and conversational and is not quite so obvious that it has been dropped in from a spreadsheet.

We would normally use the export and import functions and do the edit in Excel and simply re-import and merge the records to make the change, which is fairly quick and painless.

However, I was wondering if it is possible to create a workflow where the condition is Account Name contains Limited and then the action is to effectively update the Account Name field without the Limited characters.

I can’t see a way of doing this but if there was it would be very useful as we are also looking to do a data cleanse to tidy up a number of other similar inconsistencies in our database.

If not, no worries, we will do the export import/merge process, which will do the job in bulk and do the updates that way.

Not something that is high priority or aimed to sap anyones time, just keen to understand if anyone knows off the top of their head if it is possible within the existing functionality of workflow, as the documentation doesn’t allude to it from what I can see having read it through.

You can do that with calculated fields.

If SQL is also a good option for you - that would be the super-fast option.

Whatever strategy you adopt, be careful to avoid data loss as you’re still testing your scripts.

Excellent @pgr. Both are options - never really thought of the SQL route but could do this in PHPMyAdmin I suppose. I will always test these out on the non-prod system first as you say.

Will give Workflow a quick go now, before I get stuck into other things.

Wherever possible, we like to try and do things within the app, so that an admin can do it as a support task going forward, rather than a developer hence the question.

Thank you.

It is similar to my request.

I have two columns for it and both fields are in two different tabs.

Just to conclude this.

As per suggestion, I did the updates using Workflow and calculated fields, which worked really well.

I did it for one record initially (a simple condition to select a specific account name) and then ran ‘on save’ just to be safe and to allow an easy check. Worked fine, so I created an update for all records using the same formula (replace function, looking for Limited and replacing with null) which did the entire database in about1 minute, for circa 2000 accounts. As I knew the creation date of the records, I could have added a condition to only check the records with this date to remove any risk if it went wrong.

It would have been just as easy using SQL and no reading time required, but once you have the concept of the formulae using P0, P1 etc… as per the workflow Calculated Fields documentation, it was very straightforward. I quickly documented this and showed the Admin and let them do the same for Ltd, plc, PLC and Plc, on the test instance, all of which were within the new records. All worked fine and they were then run on the prod ssystem. With this method, we also have the documentation of the updates within the workflow itself, as an audit trail, should we ever need it.

A very powerful feature with lots of possibilities, that we will use further in the future, I have no doubt.

Thank you again.

1 Like

If you like this, you would probably love my addon PowerFields (links in my user profile).

1 Like

And Workflow can run on EVERY save -so that IF a user adds an account with a ‘ltd’, it is removed on save by the workflow.

We use Workflows alot like that, to clean up human entry, eg

  • 2023 → 23 (where our standard is supposed to be 2 digits)
  • ‘Jaguar Land Rover’ → JLR: where we have some client names standardised on the short version
  • Ecommerce → eCom: where we want shorter versions of job Titles

Workflows is very useful for a power user - all done in the web UI: and @pgr’s addon takes it to another level!

1 Like

Thanks DJ.

Yes, we do something similar with Forecasting. The Account Managers can put in a percentage as whatever they think is realistic at each sales stage, but do have guidelines. However, we also have a custom field which is effectively the system generated company defined %age for each sales stage.

So ;
Prospect - 10%
In qualification - 20%
Qualified - 30%
Opportunity - 40%
Proposal Submitted - 50%
etc…

When they do sales reviews. where the AM input %age is different to the system %age, they need to explain why they have varied it. We use a workflow to recaluclate this on save, so every time an AM changes the sales stage or %age, it gets done. Helps ensure that they are realistic with their forecast and understand why they are being more bullish with their expectation, such as ‘the CEO is my Dad’ :slight_smile: .

We find this type of check and balance really useful in other places as well.