Scheduled Job to randomize a string field value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2024 01:35 PM
I'm looking to run a scheduled job (every 72 hours) that will randomize a string field on our Account table. This will be done for all Accounts. For example, the field would have a value of 23-YH78-2345. In the next 72 hours, a job will run that will change/randomize it. And randomize it again in another 72 hours. Looking for suggestions on the best way to do that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2024 02:08 PM
Hi @MStritt,
I guess you can write a Scheduled Job for that but why is that needed? Sounds very odd to me.
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2024 02:24 PM
Hi James,
For security purposes. Currently, it's a static value. Each account has its's own unique number that is used to access the Support Portal. We want to start changing it every few days, so it's changed/randomized. Any ideas on what the code/script would look like, to accomplish this? Say the field is called 'portal number' on the Account table. Job runs every 72 hours, looks at that field on every account, and randomizes it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2024 02:28 PM
So I guess it's like a password and you are changing it regularly for security purposes.
What is the format of the output that you want? I see that you mentioned '23-YH78-2345', so is it 2 digits followed by a hyphen, followed by 4 alphabet characters, followed by a hyphen, and followed by 4 digits?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2024 02:37 PM
Correct.
Regarding the format, I'll have a better idea tomorrow of the format we want to use. Not sure if it matters that we keep the current format. Can I update you tomorrow with the format?