OverrideSearchTableName


Author
Message
Alex Luyando
Alex Luyando
StrataFrame User (298 reputation)StrataFrame User (298 reputation)StrataFrame User (298 reputation)StrataFrame User (298 reputation)StrataFrame User (298 reputation)StrataFrame User (298 reputation)StrataFrame User (298 reputation)StrataFrame User (298 reputation)StrataFrame User (298 reputation)
Group: StrataFrame Users
Posts: 112, Visits: 1.2K
Hi all -



First use of the OverrideSearchTableName feature from the latest SF beta... a few questions popping up.



1.) It appears you must have all the columns that are in the "real" business object (i.e., the BO mapped to the actual SQL table that will be the target of inserts/updates) in the view? Makes sense, since the BD will then use its data to populate the real BO. Have I got this correct?



2.) Looks like you must always override the DataType if you want the Search Fields to use a "view-only" column, yes? Before doing this got strange-looking results where the view-only column was in the list of Search Fields, but the BD would not honor my checking it to include it in the list of fields I could use to enter selection criteria.



3.) Any differences in the implementation of this feature between the last beta and the current production release? In the process of renewing our license and I don't want to build stuff with the latest beta that will need reworking once I am on the latest production build.



TIA

________________
_____/ Regards,
____/ al
Replies
Alex Luyando
Alex Luyando
StrataFrame User (298 reputation)StrataFrame User (298 reputation)StrataFrame User (298 reputation)StrataFrame User (298 reputation)StrataFrame User (298 reputation)StrataFrame User (298 reputation)StrataFrame User (298 reputation)StrataFrame User (298 reputation)StrataFrame User (298 reputation)
Group: StrataFrame Users
Posts: 112, Visits: 1.2K
Trent -



First of all, thanks for taking the time to look into this so deeply. I appreciate it.



Secondly, I just went through and created a new maintenance form complete with BD to retest the problem I am having. This time, I used pure StrataFrame base classes (i.e., not my intermediate layer classes that are derived from SF classes) just to see if something along the inheritance tree was causing issues. Same problems. Sad



As to your reply to my points…



If you're saying that under no circumstances the dropdowns should be empty, then clearly we have a problem as mine are.



Also, I tested the "typing in wrong column name" theory by copying the search field "CompanyName" that works (and which is based only on the view… it does not existing in the "real" business object) to the BrowseResultsLayout dialog. There I pasted it as a Field, as well as specifying the resulting index as a Column. Doing this generates the "The given item name could not be evaluated. The item 'CompanyName' does not exist on the business object." error at runtime as soon as I perform a search. Note that if I drop the CompanyName (the view field) from the browseResultsLayout I can search on CompanyName and the main BO get populated without issues. So, I am convinced I am typing the view's column name in correctly (since searching on it works great).



As for the setup of the BD I have specified the OverrideSearchTableName to be the view, set the OverrideSearchTableSchema to dbo (same as BO, so this was optional), and specified the BusinessObjectToPopulate to the BO on my maintenance form. Since I can do a search on the view's CompanyName column (so long as CompanyName is not in the BrowseResultsLayout), then click OK on the BD and have my maintenance form's BO populated, I am convinced there's no disconnect between the BO's table and the view (e.g., overriding the BD with a view based on some other non-related table).



In terms of overriding the data type I am accessing the Data Type tab in the Search Field Criteria dialog, checking the Override Data Type and specifying (in this case) String.



Don't know that the above gets us any closer to a resolution, but perhaps there are some clues you will be keen enough to pick up on. Is there anything else I can do/try that would help you help me?



By the way, doesn't look like 1.7.0.2 is in our account… guess it's not released yet?



Thanks!

________________
_____/ Regards,
____/ al
Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Trent,



I think for this one, it would be better if you can put together a small sample app or add this feature to the StrataFlix sample so we can look at its implementation.

Edhy Rijo

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
OK, I have put SF 1.7.0.2 out in the My Account area and have made a few minor changes to the BrowseDialog. I may send out an email and post a news article later, but this should be ready to go. After you load the 1.7.0.2 build (I fixed some minor things to make life easier) then you will need to do the following to make this sample work. It uses the StrataFlix database, so make sure it is loaded. Once loaded, then execute this command on the StrataFlix database to create a view for this sample:



CREATE VIEW SampleBrowse

AS



SELECT

   MV.*,

   

   -- Get the top 1 cast member for the last name

   COALESCE(

   (

   SELECT TOP 1

      P.pl_LastName

   FROM MovieCast AS MC

      LEFT JOIN People AS P ON P.pl_pk = MC.mc_pl_pk

   WHERE MC.mc_mv_pk = MV.mv_pk

   Wink, '') AS CastLastName,

   

   -- Get the top 1 cast member for the first name

   COALESCE(

   (

   SELECT TOP 1

      P.pl_FirstName

   FROM MovieCast AS MC

      LEFT JOIN People AS P ON P.pl_pk = MC.mc_pl_pk

   WHERE MC.mc_mv_pk = MV.mv_pk

   Wink, '') AS CastFirstName

FROM Movies AS MV







Note: This query is not optimized so please don't post threads saying that the sample takes 10 seconds to being back a result set. I was not trying to create an optimized query, just one easy to understand without creating new indexes, etc.



After this is done, then the sample should work.

Attachments
CustomViewBrowseDialogSample.zip (179 views, 85.00 KB)
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Alex Luyando - 16 Years Ago
Alex Luyando - 16 Years Ago
Trent L. Taylor - 16 Years Ago
Alex Luyando - 16 Years Ago
                     Alex,

I am sorry I have not gotten to this yet. I saw a...
Trent L. Taylor - 16 Years Ago
Alex Luyando - 16 Years Ago
Trent L. Taylor - 16 Years Ago
Alex Luyando - 16 Years Ago
Edhy Rijo - 16 Years Ago
Trent L. Taylor - 16 Years Ago
Larry Caylor - 16 Years Ago
Trent L. Taylor - 16 Years Ago
Alex Luyando - 16 Years Ago
Trent L. Taylor - 16 Years Ago
Alex Luyando - 16 Years Ago
Trent L. Taylor - 16 Years Ago
Alex Luyando - 16 Years Ago
Trent L. Taylor - 16 Years Ago
Alex Luyando - 16 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search