File records in Format Control
Is there a place the $file0 is being assigned values in other module Format Controls or is there a location the value should be assigned like in other modules?
You can define $file0 manually by adding the initialization expression:
I have, however, run into some problems with newer releases with this approach, but by moving the expression for the first line of the FC calulations section, then setting it to execute on Initial display only, it worked reliably.
I tried that and in RAD debugger the file0 value shows it is full of the current record being displayed. However the issue is once I hit the Save button the values become null. So I'm thinking it's somewhere between the action, displayoption and process, any ideas where it might be getting wiped?
I'm calling a subroutine where I call a script.execute and I created a script that uses the file varilables. Is there a way to use these variables in the script? I set it up in device to use a subroutine calling a Scripts that uses this RAD statement and uses the variables correctly $L.rc=jscall("SIConfigActivity.createActivity", $file, $file0, operator())
Also inside notifications the $L.file.save is null as well. I am getting the feling I missed a process or a environment variable somewhere?
The $file0 file variable is generated in the format.cint RAD Application.
---> This panel initializes the $file0 file variable
---> This panel populates the $file0 file variable
Troubleshooting this issue will require tracing the work-flow backwards to find the "empty" record. Generating a trace and/or using the RAD Debugger will help in this process. Basically, you will need to identify which "parent" RAD Application fails to pass a populated "original" record.
Example work-flow when updating a contact:
se.view.engine passes $L.file.save to se.base.method
se.base.method passes $L.file.save to format.cupd
format.cupd passes $db.supd to format.cint
format.cint creates $file0 using $db.supd (technically named $db.srec within format.cint)
RAD Debugger excerpts:
|46| RAD: se.view.engine
|46| RAD: se.base.method
|46| RAD: format.cupd
|46| RAD: format.cint
That seems to be a complicated way of going about generating actvities.
If you're creating a brand new module, I'm assuming that you're using se.base.method as your RAD application in the Process record you're using to handle and save-type action ("add", "update", etc). That se.base.method has two parameters ("file" and "second.file") that take two values ($L.file and $L.file.save) to handle before and after checks for activity.
I am using se.list.engine.
Correct me if I'm wrong but the way it is determined is the Object record under the tab "Manage Queues" and "Add/open application".I attached the object record image of the location i am talking about That is where I set that. If I use se.base.method it throws a RAD exception as attached.
Instead when I use the se.list.engine the error goes away and I dont get the issue I had before when using se.view.engine as I did in this linked previous post.
Try the work-flow with the Add/open application (scm.add.appl) field empty to see if default actions take over. It appears this field is only populated for the OOB module files that have pre-defined RAD Applications (e.g. cm3r.main, cc.open.from.menu, etc).
@Jacob Heubner Yes I am using se.list.engine. As pictured with other ones I get an error.
@-m- When using scm.add.appl ServiceManager logs me out.
If it helps to know I used the book "Service Manager 7 Techniques" by Mike Sanders and the HP Help for Document Engine pdf. My system is Service Manager 9.2x and will be upgraded to 9.30 when that is available in July.
The field name in the Object record with the "Add/open application" label is scm.add.appl (it is not a RAD Application). Please try removing the value "se.list.engine" from this field and leave it blank.
Although there might be some exceptions, there should not be a need to call/specify se.list.engine or se.view.engine directly. These are basic components of the Document Engine work-flow and will be called automatically as needed.
I removed the paramater and the issue now is when you click "new" on the scm.advanced display-screen(from the to-do list) it just goes to the search screen instead of the open for my new module.
I haven't read Mike Sander's book. Everything I know I know because I've tried it and it works.
For the places where I have implemented a new Module (including ones that generate activities) I've done the following:
Added displayscreens. In most cases, I start by copying the db.search and db.view screens, and renaming them based on the module I'm building.
Added displayoption records. In this case, the ones we're concerned with are ones for 'add' and 'save'.
Added States records. This is where I can link the displayoption records to the custom Processes for this module's 'add' and 'save'.
Added custom Processes. Let's take a look at the Process I have linked to the 'save' action for this module.
As the first RAD call in the Process record that gets triggered on the 'save' action, I have the following:
RAD Application: se.base.method
Parameter Names | Parameter Values
file | $L.file
prompt | "update"
second.file | $L.file.save
record | $L.fc
second.record | $L.object
text | $L.exit
boolean1 | nullsub($G.bg, false)
In the final expressions, I have: if ($L.exit="normal") then ($L.exit="resetrec")
With this, when the user clicks the "Save" button for this module, it calls the custom "Save" process; the se.base.method has a built in call to the RAD application that checks for the generation of activity records, so all I had to do was set up activityaction records for this table and the mode (add/save)
I don't know how you've done it, but this is the base that I start from, and I've never had any issues with generating activities, getting $L.file.save and $file0 to work like it's supposed to (which doesn't mean that I capture those values in the RAD debugger, unless I turn on tracing and set breakpoints when variables change... some variables don't last long enough for you to see them in the debugger).
This may not be the answer you're looking for - I don't know how to get it to work the way you're doing it, since I don't understand why you'd make a cal to the RAD application that handles generating the list view of records when you're trying to save a specific record - but it is what I do to make activities work.