Help creating table rule

Arthur Sanchez
Giga Guru

I want to create some fields in a table but I can't understand its rule with certain date fields, example: I created a table and incorporated the Task table, which already comes with the State, Opened and Closed fields and these fields already have a rule between them, if the state is open, the Opened field marks the date and time when it was made, same thing in Closed when the state is closed.

But how do I make this rule from scratch? If I create a table from scratch it will only have the standard fields, how would I put this rule?

7 REPLIES 7

Astik Thombare
Tera Sage

Hi @Arthur Sanchez  ,

 

  • Whenever you create a new table, six fields are automatically generated: sys_id, created, created by, updated by etc 
  • If you extend an existing table (like the task table with fields like state, assigned to, and priority), all these fields will be inherited by the new table.
  • To modify the behavior of inherited fields, you can use a dictionary override.
  • For other customizations, ServiceNow offers various components:
    • Business rules
    • Client scripts
    • Flows
  • If you're not extending an existing table, only the six system-generated fields will be present. Any additional fields and flows must be configured manually.

References:

       If my reply helped with your issue please mark helpful 👍 and correct ✔️ if your issue is resolved.

 

                         By doing so you help other community members find resolved questions which may relate to an issue they're having

 

 

Thanks,

Astik

Hi @Arthur Sanchez  ,

 

             If my reply helped with your issue please mark helpful 👍 and correct ✔️ if your issue is resolved.

 

                         By doing so you help other community members find resolved questions which may relate to an issue they're having

 

 

Thanks,

 

Astik

But my question is more about the logic and definition of dates If you view the task table, the State fields will be automatically connected with the opened, opened by and closed, closed by fields, both are date fields linked with the State

My question is how I could make this same ZERO relationship with new fields created by hand Example, I create a table without changing the task table, and create the fields:
STATUS, Close, Open
How would I list the choices made in the states field to place the Date and time in the Close and Open fields?

Hi  ,

 

These functionality works with business rule -

 

For closed and closed by -When closing an open task, both Business rules named 'mark_resolved' and 'mark_closed' are being executed. As a result the 'Resolved' and 'Resolved by' fields + the 'Closed' and 'Closed by' fields are being updated respectively if they are empty.

 

While the business rules for "mark_resolved" and "mark_closed" are documented and clearly update the "Resolved" and "Closed by" fields respectively, I haven't found any documentation for similar functionality regarding "opened" and "opened by" fields. However, I assume they are likely updated in the same way.

 

If my reply helped with your issue please mark helpful 👍 and correct ✔️ if your issue is resolved.

 

                         By doing so you help other community members find resolved questions which may relate to an issue they're having

 

 

Thanks,

 

Astik