You are viewing limited content. For full access, please sign in.

Question

Question

Stored procedure can only be called once per form?

asked on April 13, 2016

I have a stored procedure I'd like to use for multiple fields on a form.  However, I've found that once I use it as a Lookup Rule for one field, it is no longer in the drop down list of available stored procedures from the server.  Is this really a restriction, or am I doing something wrong?  If it is a restriction, why?

If I can only call it once, can I load a variable with the results, then use that variable elsewhere in the form?  

I've attached a file with a screenshot showing the item selected in one rule, but not available in the other.  I worked around the problem by duplicating the script and calling it [ScriptName]2, but that's a hack.  

LF screen.jpg
LF screen.jpg (261.82 KB)
0 0

Replies

replied on April 14, 2016

I noticed on forms 9 that you cannot do that.  Once I went to forms 10 I noticed it now lets you do multiple look ups.

1 0
replied on April 14, 2016

Thank you for your reply, but I have to say, as a programmer, I find this to be a total load of hooey on the part of Laserfiche.  What a crock.  Why create a restriction like this in the first place?  

0 0
replied on April 17, 2016

It is not restricted in Forms 9 actually: In Forms 9, the UI is to group lookup rules for same data source, if you want to add multiple lookup rules for same stored procedure, you can click the button after the first rule to add more:

0 1
replied on April 18, 2016

That's not the same issue at all.  Your example shows obtaining multiple return values from the same call to the stored procedure.  I need to call the procedure multiple times, for different fields on the form.  Laserfiche Forms is only giving me the option of calling it once.

0 0
replied on April 18, 2016

It does call the stored produce multiple times for multiple rules, see following screenshots for example, the stored procedure has a input parameter which is FirstName, for different rules, I input different value for the input parameter and get different results:

1 0
replied on April 21, 2016

Thanks!  That does work, but is sort of counter-intuitive, when the fields are on different positions on the form, and are conditionally hidden.  Now that I know it works that way, I can likely work with it.  Thanks again.

0 0
replied on April 13, 2016

Sam,

   What version of forms are you using and with which database? We're using the same stored procedure multiple times on Forms 10 Update 1 with a SQL backend.

0 0
replied on April 14, 2016

Forms 9.1, SQL Server 2010 in the backend.  Once the stored procedure is used once it is no longer in the drop down list of procedure names in the Lookup Rules.

0 0
replied on April 14, 2016

You should be able to but if nothing works you can always create copies of same stored procedure multiple times with different names and call it in forms. 

0 0
replied on April 14, 2016

I wanted to replicate this 8-9 times.  That's a huge hack.  That the product has a restriction like this is unimaginable.

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.