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

Question

Question

SQL view not populating in form

asked on August 27, 2021

Having an issues with populating values from a SQL view in LF Forms.  Our DBA just created a new views on our LF SQL server.  The view works fine in SQL and I can see the view in LF forms when adding the look up rule.  I’ve completed this process numerous times in the past, so I’m perplexed as to why the data does not populate in the form.  None of the values are being returned.  I got to believe it's something simple I'm overlooking.  We use numerous views and local tables as data sources for LF forms, not sure what's different about this view.

 

Any assistance would be appreciated.  Thanks!

0 0

Replies

replied on August 27, 2021 Show version history

Have you tried to refresh the DB in Forms>Administration>Data Sources?

1 0
replied on August 27, 2021

Like Steve said, try to refresh and see if that helps. The view or tables may have been changed since it was first synchronized in which case it would still list the view as an option, but it would stop working because the definition wouldn't match.

0 0
replied on August 27, 2021

Thanks for the reply.  Yep, refreshed the data sources multiple times.  I reduced the columns in the view to only the ones I needed, refreshed, and was able to see the reduced columns in Forms when I went to set the lookup rule...still no values populating.  Very odd.

1 0
replied on August 27, 2021

I would also check to see that the value your form is sending to the lookup is what you expect just to confirm.

0 0
replied on August 27, 2021

Is the field that triggers the lookup a read-only field?

0 0
replied on August 31, 2021

I created a new form that has no restrictions.  The original form wasn't read-only either.

0 0
replied on August 27, 2021

Maybe the process needs to be added to the data source?

0 0
replied on August 31, 2021

Yep, added the process.  I can see the data source in the form as well as choose the columns from the DB table.

0 0
replied on August 27, 2021

We have had similar issues in the past and a few times it had to do with data types in the SQL not matching the type of the form fields, a few times it had to do with the length of the form fields (being too short for data) and all other times it was a permissions issue. Those are the 3 that come to mind that have caused those numerous times in our lookups.

0 0
replied on August 31, 2021

Thanks for the items to check.  Where did the permission issue occur?

0 0
replied on April 19, 2022

Gosh I never answered this at the time. Permissions for the user in the profile that is in the connection of the database data source. I'm sorry that took almost a year to answer. :(

1 0
replied on August 31, 2021 Show version history

View is an imaginary table, contains only the fields(columns) and does not contain data(row) which will be framed at run time Views created from one or more than one table by joins, with selected columns.  Maybe the view and table aren't joined? Not sure if this helps uncover anymore clues.

0 0
replied on August 31, 2021

If I run the view in SQL studio and results are returned, is that a good indication that the view and table are joined?  I have the same view running from a test SQL server which populates in LF forms successfully.  The production view is essentially the same configuration, but pointing to a different SQL server.

0 0
replied on April 19, 2022 Show version history

ever get this one solved? I have same scenario. Very unusual behavior. 

 

Nevermind, solved it. Needed to lookup on 2 column rather than just 1. I didnt build it, so slipped by me. Hope you could get your resolved!

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

Sign in to reply to this post.