Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Examining a file within a display screen

Examining a file within a display screen

Examining a file within a display screen

Hello, I am fairly new to ServiceCenter and have run into an issue. A display screen (cc.first) has an option that runs an existing RAD. I want the RAD to execute only when a value exists within a different table/file (not the table/file that is assigned to $file in the display screen). I want to search the "solution" table for an id... if it exists then the RAD should be executed. I tried to assign the solution table/file to a variable in the following manner (through the Pre-RAD expressions)...

'rtecall("fileinit", $L.errcode, $L.file1, "solution")'

The error says that the 4th parameter must be the source file. I checked the db and the "solution" table does exist in the db. How do I assign this file to a variable as a Pre-RAD Expression? Once assigned to the variable, is there an easy way to check the file for a value in a specific field?

RE: Examining a file within a display screen

check the documentation for validation / fill / formatcontrol

there is no rtecall fileinit , may be you talking about rinit ? check the links for this forum for some basic information ... you already got a peregrine training ?

RE: Examining a file within a display screen

Unfortunately I am unable to get the training, although it would be exceptionally useful. In the SC 5 documentation, "fileinit" is the correct parameter for the rtecall function. I am not seeing anything for "rinit". Is this new to version 6? What does it do and what is the syntax? When I use the rtecall syntax listed below it returns a value of true in the debug window.

'd rtecall("fileinit", $L.errcode, $L.file1, $file)'

So when I replace $file with "solution" is when SC generates an error (as in my first post). Any ideas of how I can instantiate the solution file so that it may be used?

RE: Examining a file within a display screen

The "rinit" RTECall is not in the SC5 documentation. It was listed in the documentation for SC4, but was dropped in later documentations. The SC4 documentation lists some other RTCalls that are also not listed in the newer docs.

"rinit" basically creates a new file handle and assigns it to a variable (file variable). While "fileinit" (which is a valid RTECall, as you say) requires the last parameter to be an existing file variable, "rinit" requires that it is a file name. Besides that difference, the syntax of these two are practically the same.

They used to have a copy of the SC4 "RAD Guide" (which lists the RTECalls) available for download at www.sc-resources.net, but I was not able to find the location while writing this. Anyway, you can register with that site; they also have a forum where you can post questions and the registration is free. Furthermore, one of the postings is an on-line list of all unlisted RTECalls; after registration, do a search on the keyword rtecalls or try the link www.sc-resources.net/viewtopic.php?t=33031.




RE: Examining a file within a display screen

This may push you in the right direction:


$L.solution.query="id=\""+id in $L.filed+"\""    <-- assumes string type for id


You could base your condition on the $L.solution.sel.flg which will return 1 if one record, 2 if multiple, 3 if no records found, 4 if error.

Condition might be (depending on your requirements):

same($L.solution.sel.flg,1) or same($L.solution.sel.flg,2)

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close