How do I add an optional selection criteria to a SAP HRFORMS print program? - sap-hr

I'm trying to add a checkbox to the standard payadvice driver program to enable the user to e-mail the form instead of printing it.
Because the print program is automagically generated from the print form (transaction HRFORMS), I can't just go and change the program.
Within transaction HRFORMS I have some control over the selection screen via Optional Selection fields below: Is it somehow possible to add a custom selection criteria to this via config?
I could wrap the generated program in a custom program of my own, but then I would lose a lot of the existing configurability.

I have been unable to find a configurable solution.
However, SAP already provides a standard wrapper program for HRFORMS:
H99_HRFORMS_CALL
I enhanced the selection screen in this program using implicit enhancement points, and passed the necessary parameters to the print form using Parameter ID's.

Related

How to generate a one click stack launch link for OpenStack Horizon

I want to generate a single link that is equivalent to the following steps:
Open OpenStack Horizon
Click Orchestration -> Stacks -> launch stack
Load a heat template from file/URL
Populate some of the parameter fields
At this point, the user is at the "Launch Stack" screen and can enter additional parameter values (e.g. stack name, etc.) and click launch when ready.
I do not want to use the API to actually launch the stack as this will require knowing all the parameter values in advance. I want the users to use the Horizon interface they are familiar with, however, I would like to load the template and populate only some of the parameters which are already known, leaving some parameters blank for the user to enter manually.
I also do not want to use static default parameter values within the heat template as some of these parameters need to be set dynamically.
Is there a way to generate a single URL that will contain the heat template and its parameters as query string for example? Is there another method to accomplish the above requirements?

Google App Maker Widget Validate on Datasource select

I have three different fields/textbox widgets, that rely on querying the same data source to be checked to avoid duplication. For reasons, I do not want to turn on the unique/required for those three fields.
I put some code to check for validation. My problem is that when I call the form's validate function, it takes some time till the validation comes back with an error message. However the form's validate returns immediately and allows people to click Submit.
How can I avoid this problem?
Block till validation kicks (setTimeout function?)
Set a separate invisible field such as working and set the validationError on the field and clear after validations clear? This will probably be a numeric field so that I can wait for all streams in parallel to finish.
Final question. is Validate a blocking function as it goes through the fields? I am guessing Yes.

How to manipulate or clear the undo-redo chain of a TextInputControl?

I'm implementing a custom embeddable command line console control in javafx8, based upon the stock TextArea control.
I'd like to be able control what does and does not go into the internal undo/redo stack: user edits on the command line (yes) but application responses to those edits and subsequent output to the readonly portion of the text area I am maintaining (no).
The TextInputControl includes a nicely designed UndoRedo linked list, but everything to do with it seems to be private.
How do i manipulate the TextInputControl undo stack either directly or indirectly to e.g. pop a link off it after appending output text?

How to check if character has been restricted in a TextInput?

Restricting characters in TextInput can be easily done, but how can I check if particular character was restricted without manually parsing the restrict property?
For example: restrict='a-zA-Z^L-W'.
How do i get that B is allowed and M is forbidden?
If it matters, I need this functionality to show a user the explanation why his key presses don't affect the input content.
I was able to implement the message by checking input.text.indexOf(keydownchar)==-1, but I'm interested if there's any SDK method to check the char without trying to append it into the input control.
There's no SDK method to check the incoming char. You'll have to query the restrict text (ideally on the changing event).
It can be done with
StringUtil.restrict(str:String, restrict:String):String
It is exactly the method used by text display controls like RichEditableText to handle restrict property.
There's also more suitable method for testing single char, but unfortunately it's private:
StringUtil.testCharacter(charCode:uint, restrict:String):Boolean
Anyways it is used inside StringUtil.restrict, so using StringUtil.restrict instead of testCharacter will produce the same result with performance overhead.

Create multiple CCK nodes with single custom form in Drupal

I need a form which will allow creation of several related nodes at the same time. All of the nodes involve CCK fields.
I would like to use as much of CCK's built-in validation, submission, input widget, and security functionality as possible/practical.
What is the best way to accomplish this in Drupal 6? Are there 'best practices' or docs anywhere?
Here are 3 possibilities I can see. I would love feedback on whether any of these would work, or if there are even better options.
1.
start with the standard node creation form for content type foo.
modify the form by adding fields for content type bar, using hook form_alter [can cck widgets for content type bar be inserted directly?]
use a custom submit handler to create node of type bar when the form is submitted
[can the standard cck handler be called? or do i need to 'manually' construct the node object, do my own validation, and use node_save?]
2.
create a new, custom form that concatenates the 'normal' node creation forms for the relevant content types.
then use hook form_alter to modify the forms as necessary.
allow standard cck submit handlers to do the work of creating the nodes.
3.
create a custom form from scratch
create the nodes in my own submit handlers, using node prepare, node save, etc.
If found documentation on re-using the standard node creation form, but creating multiple nodes at the same time is not mentioned.
Using hook nodeapi and hook form_alter is documented in a post on advomatic's site, but the particular method descrube seems to require polluting one of the content types with 'dummy' fields.
Thank you very much for your help!
The advomatic guys posted a nice solution to this.
http://www.advomatic.com/blogs/jonathan-delaigle/multiple-nodes-single-node-submission
why not just use hook_nodeapi to handle the node creation for certain content types.
just set up a test condition to see if $node->type = 'foo', and then run a function to create two nodes or however many, using the values from the predefined fields. you can even set hook_nodeapi to only run when the $op is almost ready to insert the node into the database, thus ensuring the object has been run through appropriate validation before being passed on to the new nodes that need to be created.
http://api.drupal.org/api/function/hook_nodeapi/6 this page has a list of all available operations for the $op variable and what they do.
I hope that helps
If the 2nd type bar needs only one or two additional inputs (fields) from the user, I would go with your approach one.
But given your clarification it seems that foo and bar are sufficiently different and complex, so your approach two seems more reasonable.
Concatenate both forms into one and hide the bar fields that you want to populate from the foo fields (or node, after you created it). In the forms validate and submit functions, you'll have to separate the forms again so that you can call the standard validation/submit handlers for both separately.
I have not done this yet, so I'm not sure how well this will play with the cck functionality, but I would expect it to work reasonably well to give it a try.

Resources