FoxInCloud
Error : "Could not find view parameter record in this alias..."
Gravatar is a globally recognized avatar based on your email address. Error : "Could not find view parameter record in this alias..."
  Paul
  All
  Jan 6, 2019 @ 08:23pm

Happy new year!

I'm back onto the task of creating a prototype of our ERP system using FiC.

I did have our login form (loginform) working, but today I made a change in the form (wlContentDynamic = .T.) and now the form no longer works.

The error displayed is :

site 'FoxInCloud App' - Sficprocess.wformstandardpage() - Sficprocess.wform() - awserver.fxp!Awajax.lsuccess() - awajax.lSuccess(.f.): Error detected at code line #17,167 of method 'awajax.propslocateviews'  
"Could not find view parameter record in this alias for this form (hereafter) -- Tip: make sure that the .Load() code in your form and its parent class(es) execute DoDefault() so that the code in (modify class awFrm of aw.vcx method Load) executes"  
FORMLAUNCH  
loginform  
awserver.fxp!Awajax.forminitsave() - Awapphost.formlaunch(tcForm: 'loginform', tlSubForm: .F., m.tcSuffix: '') - Properties of form "loginform" could not be saved:

In another post related to this error you mentioned :
"FoxInCloud stores the form state in a VFP table, one records named wItems holds the views and CADs definitions and parameters.
In this case (from Oct. 2018), something went wrong with the table and the 'views' record could not be found."

If you are referring to the loginform_ini.dbf database file in the Temp directory then indeed it does not contain a row for WITEMS, though I see that other tables do. If I delete the files and restart WC, the files are recreated but again no row for WITEMS for my login form.

If I change the form's wlContentDynamic back to .F. then the form starts working again in the browser!
I see that the WITEMS row is then created also.

I have a another form that is displayed after the login form and I have found that if I set wlContentDynamic = .T. in this form then the same problem occurs.

What is the solution please if I want wlContentDynamic = .T. ?

(As an aside, have you considered using SQL Server LocalDB or something similar instead of Foxpro tables, it would be more robust during improper shutdowns).

Thanks.
Paul

Gravatar is a globally recognized avatar based on your email address. re: Error : "Could not find view parameter record in this alias..."
  FoxInCloud Support - Thierry N.
  Paul
  Jan 8, 2019 @ 05:04am

Happy new year Paul,

You've found a bug: when form.wlContentDynamic, as views are handled by a collection object that is a member of the form and, erroneously, FoxInCloud does not save any member in the form, the 'views' collection state is not saved and thus the wItemsrecord not created. We'll add an exception for non-visual members in a future release.

However, setting .wlContentDynamic at the form level seldom makes sense; it should more often be used for a container, eg. for a list of connected users.

Maybe you can try to limit .wlContentDynamic to a smaller part of the form.

Gravatar is a globally recognized avatar based on your email address. re: Error : "Could not find view parameter record in this alias..."
  Paul
  FoxInCloud Support - Thierry N.
  Jan 8, 2019 @ 01:24pm

So any control that might have its top, left, height or width changed and any container that might have controls added to it during runtime should have wlContentDynamic = .T.?
Also wlContentChanged should be set to .T. after the change has occurred?

Paul

Gravatar is a globally recognized avatar based on your email address. re: Error : "Could not find view parameter record in this alias..."
  FoxInCloud Support - Thierry N.
  Paul
  Jan 8, 2019 @ 01:38pm

any control that might have its top, left, height or width changed

no, this is handled by .wcPropSave

any container that might have controls added to it during runtime should have .wlContentDynamic = .T.?

yes, added with .addObject() or removed with .removeObject()

.wlContentChanged should be set to .T. after the change has occurred?

Yes: it tells FoxInCloud to regenerate the HTML contents

Gravatar is a globally recognized avatar based on your email address. re: Error : "Could not find view parameter record in this alias..."
  Paul
  FoxInCloud Support - Thierry N.
  Jan 8, 2019 @ 02:08pm

Incidental question - does wcpropSave need to contain "wcpropSave"? I assume FiC handles this property separately.

Paul

Gravatar is a globally recognized avatar based on your email address. re: Error : "Could not find view parameter record in this alias..."
  FoxInCloud Support - Thierry N.
  Paul
  Jan 8, 2019 @ 10:33pm

right, FoxInCloud Server cleans up .wcPropSave value automatically

© 1996-2019