File records in Format Control

I am adding a new module to my system called PACR. In this module I am adding activity records. I was able to add activity records to Configuration Management doing a javascript comparison between $file and $file0 inside format control. However in the new module PACR the $file0 is full of null values. I checked "Save Copy" in format control but the record's($file0) properties are all null values.

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?

Parents Reply Children
  • 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).

  • 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).

  • @ Yes I am using se.list.engine. As pictured with other ones I get an error.

    @ 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.

     

    Note:

    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

    Condition: true

    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.

  • I am using the list process on the Object Record not in the states. I believe the book was made for 7.x of SM and that's why it's not working the way it was defined. This is why it probably doesnt make sense since I threw in alternatives from different sources of help like forum postings, HP's Help Contents, etc.

     

    Using se.base.method in a process throws an error in my new module. Screenshot attached.

    I assume this error is because it's not "save" it's "add" because "save" works with this method but not when the record is being added.

     

    I really appreciate you taking the time to explain that to me. I know you have a very solid understanding of the HP system and I really do appreciate the guidance you have offered so please let me know if what I'm saying is not correct.

  • The error on the screen shot might be related to the process records involved do not account for different add modes that $L.mode may be set to. 

     

    Check this => In the Process record, change this part of any condition that includes $L.mode~="add" to: $L.mode~#"add". Hope this helps.

  • I'm still not sure why you're calling se.list.engine Process.  Even in 7.11 (or 7.x at all) you shouldn't even need to do it in the State record.  You will need to define a State record to use for the list state in the Object record, but you shouldn't need it in the State record itself, nor in a Process record off that state.  Maybe it would make more sense if I did pick up the book.

     

    In your case, you're right; that error is because you're calling the 'update' value in the 'prompt' parameter from the se.base.method, and you're trying to insert a record; the sample code was from the 'save' vs the 'add'.  My code for the 'add' is the same, but uses 'add' as the prompt, instead of 'update'.

     

    That does mean that there is an "add" button and a "save" button (one calls the customized add Process and one calls the customized save Process) but I have the conditions set in the displayoption condition value so that only one appears, depending on if the record is a new record or one being updated.

  • Originally I was using se.search.engine not se.list.engine. I'm using the book for most of the modules definition but not in this case. The problem was the book defined to use se.search.engine(or was it se.view.engine?) and the system was throwing out a blank qbe after adding a new record.

     

    I think the idea of the book was to define your own Processes and States so you can add the records in a specific manner.