Trying to use only areas for the Job I'm on

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
numberz
Posts: 207
Joined: Sat Aug 05, 2017 12:13 am
Location: New Hampshire - USA

Trying to use only areas for the Job I'm on

Post by numberz »

Hi,
I know this may seem entry level but...

IF JobSystem WAS CHANGED OR JobSystem IS NEW
THEN FIND JobArea WHERE JobArea.ob_Jobs = JobSystem.ob_Job

This rule does nothing to prevent all of the Job Areas that I have in all of my jobs, to be displayed. Of course, I only want the Job Areas from the Job that I'm working on, to be displayed.

I tried Chatgpt and it gave me:

IF JobSystem IS NEW OR JobSystem WAS CHANGED
THEN FIND JobArea WHERE JobArea.ob_Jobs = JobSystem.ob_Job AND JobArea.Status = 'Active'

But that did nothing either.
Regards and thanks,
Harry Carter
kklosson
Posts: 1665
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

Re: Trying to use only areas for the Job I'm on

Post by kklosson »

We could use a bit more detail as to how these objects are related. Also, you are using the FIND action, and you say the items are being displayed somewhere. It would be key to know where/how. You must be sure the JobSystem object is in context. Perhaps describe the function more completely.
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
Heavy on AwareIM Reports
numberz
Posts: 207
Joined: Sat Aug 05, 2017 12:13 am
Location: New Hampshire - USA

Re: Trying to use only areas for the Job I'm on

Post by numberz »

Hi kklosson,

I just realized that besides the Update Rule doing nothing, that I had entered some criteria in the ps_JobAreas dropdown for my Entry form but not in the Edit form. I added it and it seems fine. Now I only see each Job's Areas. Tell me if you think otherwise please.
Attachments
query.jpg
query.jpg (83.81 KiB) Viewed 2013 times
Regards and thanks,
Harry Carter
kklosson
Posts: 1665
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

Re: Trying to use only areas for the Job I'm on

Post by kklosson »

I concur with my limited understanding. Also, you probably don't need the This prefix so long as JobSystem.ob_Job is always in context and not overwritten by any other instance of the object.
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
Heavy on AwareIM Reports
Post Reply