Important Update: Community URLs redirect issues are partially resolved. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

Sub-Forms and Last Updated

TimothyScott1
Contributor III

I have noticed that saving new record entries to my sub-form does NOT update the 'Last Updated' field of my parent record.

How can I determine if a new sub-form entry has been made for the purposes of sending a notification?

I have tried using the Criteria 'Action Log' and operator 'Changed' but this seems to never evaluate to TRUE.

 

It seems the parent record is unaware of changes to the sub-form.

 

thank you!

1 ACCEPTED SOLUTION

Accepted Solutions

Bradley what you can do is in the parent application is create a custom object to store the record tracking id in a session variable (use sessionStorage.setItem('trackingId',getRecordId());).  Then in the sub-form create a custom object to read the session variable (use sessionStorage.getItem('trackingId');) and go from there.

 Advisory Consultant

View solution in original post

26 REPLIES 26

Ilya_Khen
Champion III

Mm, I do not think you can easily make any condition that would fire off notification immediately. Changed would not work with subform, AFAIK.

 

You can use some calculation by checking maybe COUNT records in the subform, but that would not help in case you change the same record in subform. But then again, that type of calculation would be considered as soft trigger, so not good for calculation.

 

If you do not need Instant notification, you can use Reminder notifications and COUNT calculation.

 

Something is possible with A2A, but conditions to be created as well, and not real time notification anyways.

 

You should consider ODA or Questionnaire instead of subform then.

Tim-

In your case, I agree with Ilya regarding using a questionnaire instead of a sub-form.  Sub-forms have limited capabilities where as questionnaires have full capabilities as applications.  Using a questionnaire, you can set the notification there, or set up fields in the application to run the notification, whichever is most appropriate for your needs. 

 

In general, I avoid sub-forms altogether simply because there may be a need for the additional functionality later down the road, however, there may be a time when these are appropriate.

-Nolan

BradleyHanna
Contributor III

The Administration 1 training guide on page 133 says that a Key field within Sub-Forms can be evaluated by a Rule for a data-driven event.  I do not see how to make a field within a sub-form a key field.

 

Is it possible to make a field within a sub-form a key field?

What is actually evaluated when using the changed operator on a sub-form?

 

The changed operator is available for sub-forms, there must be some use associated with the operator.  What functionality is it intended to provide?

It is not about Key Field, but Tracking ID, AFAIK.

But changed operator works very poorly for subforms, and it fails in most of the cases also, if i remember right. So, I would not count on it.

BradleyHanna
Contributor III

An ODA cannot be used because of license availability.  A Questionnaire is also inappropriate for the design because this is a kind of ticketing system.  Calculated fields are not reliable for triggering instant notifications either.

 

I would like to use a custom object within the sub-form to update a field in the parent application using a REST API web request.

 

How can the parent application's Tracking ID be obtained through jQuery or other means in a custom object?

 

Other ideas are also welcome.

You can use REST API to get Content, I believe. Bot sure you can get it directly from Subform, but at least querying application content returns all subforms used. There could be some workarounds built, but check out REST API guide for the Archer.

https://community.rsa.com/docs/DOC-97463 

Thanks for the reply, Ilya.

 

I'm tracking the RESTful API.  I want to put content to the parent application from a custom object on the sub-form.  I need the ID for the parent application for the web request.  I am trying to jQuery from the custom object to retrieve that ID.  Any ideas on the $CM pipeline I need to call to retrieve that ID?  Has anyone else tried this?

I am not sure that $CM can retrieve that from subform, as subform is kinda isolated from parent application. You cannot even refer to parent in a calculation, until you bring that parent in explicit CR.

What do you mean by explicit CR?