NetTalk Central

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Keith

Pages: 1 2 [3] 4 5 ... 21
31
Web Server - Ask For Help / Lookups
« on: August 19, 2015, 06:43:04 PM »
Hi  (I have started a new topic on this because the other thread was getting long and I wanted to start again because things have changed and moved on)

I have discovered some very peculiar things after exhaustively investigating this problem.  Firstly a recap of the current situation:

I now have a running application which includes 3 separate forms and lookups on a Districts file.  Districts has two fields, Country and District.  This running application works perfectly as regards these lookups in two cases viz:

- standard browse form
- option where a form is opened in change mode (no browse)

The third case does not work all the time - form opens in insert mode.  Specifically what happens here is that I prime country with 'New Zealand'(and this appears correctly as a radio field on the opened form) but after popping up the Districts browse, seeing the correct districts for that country (I have a filter in the browse on current country, if upper(p_web.GSV('FND:Country')) not= upper(Dis:Country) then CYCLE.) and selecting a district, the value does not get displayed in the district field.

Now, if you change country, say to 'Australia', and lookup again, the correct new districts are displayed in the browse and selection causes the receiving field to be properly populated.  From then on you can go back to any country and get the right answer.  So, its only on the first time access of the loookup for this 'insert mode' case that the procedure fails.

Also, 'Building Applications with NetTalk' says that if the lookup browse is a popup (which mine is) then the only field that you can get back is the primary key field (in my case RecordId) and that a way around that, if you want to actually put the description back into the database field (i.e. non-normalised data) then add an assignment, in this case fnd:address4 = dis:name.  However, my testing seems to indicate that this is not necessary.  If you specify the Value field as dis:name and do not do the extra assignment then the district name is correctly stored. I would appreciate a comment on that - have things changed since the book was released?

Lastly, a weird thing happens when I change the option for the lookup browse from popup to not. The browse appears as before (but full screen) and after selection, the page is redisplayed but the user is logged out and only the login menu option is available!  This is either a bug or I have done something silly but either way I would like to know the answer just as a matter of interest.

My questions then are why does this 'insert mode' case not return the selected data to the field first time, is the 'Book' out of date and what about 'not popup'?

Thanks

Keith

 


32
Web Server - Ask For Help / Re: Crash - PLEASE HELP!
« on: August 16, 2015, 06:20:14 PM »
Hi Rodrigo

The app is crashing with a GPF.  If this was because of a commonly executed component then you would be down all the time but in that the problem is intermittent and you can run for days then this might indicate that it is related to an activity that is not frequently requested.

Can you narrow the area of concern and find out what is being processed just before the crash - by interrogating a log of the web server activity?  Once you know the area you will be in a much better position to debug.

Cheers

Keith

33
Web Server - Ask For Help / Re: Field Lookup problem
« on: August 12, 2015, 11:24:43 AM »
Hi Bruce

Re the latest example. I said that all of the files in Files.zip were to be in c:/PetMotel but Control.tps needs to be in the same directory as the exe.

Cheers

Keith

34
Web Server - Ask For Help / Re: Site javascript error
« on: August 11, 2015, 06:59:59 PM »
Thanks Bruce

I have turned off JavaScript checking as you advised (just in case it annoys someone or causes confusion).

But I have never seen an actual script error myself when running on my local machine or when accessing the central server.  I suspect that there is something amiss at this particular site from where it is being reported though this does seem to be  a long shot.

I wouldn't have thought that you could induce a javascript error which only shows up on a particular browser/machine combination (I think he was using Chrome) - maybe you could confirm.

I don't want to assume that this is a problem and chase a ghost if it actually has something to do with a setup.

Keith

35
Web Server - Ask For Help / Re: Field Lookup problem
« on: August 11, 2015, 02:18:43 AM »
Hi Rainer

I have tried it with pop-up off and no change to the results.

Thanks

Keith

36
Web Server - Ask For Help / Re: Field Lookup problem
« on: August 11, 2015, 12:34:14 AM »
Hi Bruce

I have created a simpler Example.  Attached are two zip files - Files.zip and Application.zip  All of the 'Files' should be copied to c:\PetMotel  The application's folder for the dictionary will need changing.

Before you generate the example - I have also attached 'Lookups.png' which shows my currenty lookup settings and it may be that just looking at this you may see the problem:

  • The Browse for the Districts selection is bDistrictsSelect
  • The 'From table is Districts
  • The 'Value Field' is Dis:RecordId which is a unique unchanging key (a Long)
  • The associated description is Dis:Name
  • Display 'description' instead of 'Value' is ticked because the popup only returns the 'Value Field'
  • Fnd:Address4 is the receiving field and the returned value is overridden in 'More Assignments'

This all seems to be per the book and I have employed a similar set of selections elsewhere with no issues so I'm stumped.

The only other thing is the filtering of the Districts records to only return those for the currently selected Country - this is performed in an embed in the bDistrictsSelect procedure.

The behaviour is that the correct districts appear in the browse but after selection the value only gets properly returned one time in ten,  If you immediately do the lookup again you will probably get 'No Districts' which is because p_web.gsv('Fnd:Country') has become blank.

Thanks a lot.

Keith

[attachment deleted by admin]

37
Web Server - Ask For Help / Site javascript error
« on: August 10, 2015, 06:57:16 PM »
Hi

On an app which is running on a remote server we are seeing an error (in red) which momentarily displays saying 'Site javascript error' or 'Error in site javascript'.

If I access the site from a remote PC I never see any errors and never have any format problems but access from the same site where the server is (and presumably a more immediate connection) displays the errors and sometimes the error stays on the screen and the formatting of the page is lost.

Any pointers?

Keith

38
Web Server - Ask For Help / Re: Field Lookup problem
« on: August 07, 2015, 01:42:14 PM »
Thanks Bruce for the clarification.  I do understand now how it works.

I realise that you're busy and getting to an example is a lot of work.  Don't do anything more on the example because I am working on this now and feel sure I should be able to solve it.

In this case of the Form opening in Insert mode the reason why I get 'No Districts' after first choosing a District and getting the gobbledegook posted in the field is that the filter field - Country is blanked.  I Prime it with, say, 'New Zealand' and the first Lookup filters correctly but after returning gobbldegook the value of p_web.gsv('fnd:country') is blank.  So that is something to work on.

Thanks

Keith

39
Web Server - Ask For Help / Re: Field Lookup problem
« on: August 07, 2015, 01:55:19 AM »
Bruce,

Have been agonising over this problem and have realised that I have misunderstood the meaning of 'Field Value' in the Lookup template.  I now understand that in my example I have set the Value to the unique key of the District table which means that it is that value (a number) that is stored in the database and that any display of the field must cause a 'lookup' to be done so that the correct description can be displayed.

So, the districts are (essentially) static values and I have chosen to keep the actual district name not its number (I know!!!!). 

So, with that cleared up I at least understand what has been happening (number stored instead of description) which I didn't mention in my original post because it wasn't obvious.  But having regularised the code I still have a problem in the case on the form which is opened in Insert mode.  It now returns such as JPfskyXT into the display field.  I have seen this before but can't remember what causes it.  The template selections are identical in all three cases.

Thanks

Keith

40
Web Server - Ask For Help / Re: Field Lookup problem
« on: August 05, 2015, 09:43:48 PM »
Hi Bruce

Have you had a chance to look at my posted example app?

Thanks

Keith

41
Web Server - Ask For Help / Re: Second level menu getting squished
« on: July 23, 2015, 02:03:25 AM »
Hi Bruce

I have posted an app under the thread 'Field lookup problem' which exhibits this behaviour.

Keith

42
Web Server - Ask For Help / Re: Field Lookup problem
« on: July 23, 2015, 01:58:32 AM »
Hi Bruce

An example application is attached - PMTest1.zip and PMTest2.zip

The files in these zips need to be distributed as follows:

In c:\PetMotel put the content of PMTest2.zip.

In another folder put the app, dct and control.tps from PMTest1.zip

If you can't put the PetMotel folder in c: then whichever drive you use you will have to modify the record in COntrol.tps to reflect that drive (the field with 'C:\Petmotel in it).


You can access the program via: http://127.0.0.1:48040

Login with CONTROL/Keith/Keith and you will see the menus.  Contract 'FindaPet' and then expand and you will see the squishing.

If you choose the Menu Item 'Resort Records' and 'Change' a record and do a lookup on the 'region' field you will see a lookup which works.

If you then access with http://127.0.0.1:48040/?fpnew=yes you will get a menu item 'New Client'.  Click and do a lookup on the 'Region' field and you should see the selection browse but after you select something the Region field will not populate.  If you do the lookup again you will get a selection list with no records.  If you change the country and do the lookup it will work.

The field with the lookup in the forms is FND:Address4.

Thanks for looking at this.

Keith


[attachment deleted by admin]

43
Web Server - Ask For Help / Field Lookup problem
« on: July 22, 2015, 01:29:41 AM »
Hi

I have 3 different forms on which I have a District field which is populated by a Lookup on the Districts table which has two fields - Country and District Name. 

In the browse of District which is used for the selection I have code which filters the display viz:

      if upper(p_web.GSV('FND:Country')) not= Dis:Country then CYCLE.     

which means that if the country is Australia then Australian states are shown but if United Kingdom then a list of Counties is shown.

I have completed the Lookup template identically for the 3 forms (see picture' Lookup').  The Value field is a single component primary key.  There is no table relationship between the form (Resorts) and the lookup (districts).

One form is a standard browse/form situation where the form can be updated or a new record inserted and in both cases the lookup populates the receiving field.

Another form is called directly in 'Change' mode (no browse) and again, the lookup works perfectly.

The third form is called directly in 'Insert' mode and fails to populate the field on the first try.  The correct Districts display but after selection the field remains blank.  If you immediately try the lookup again there are no districts displayed.   If you then change the Country (and therefore the selection criteria) and redo the lookup it works and seems to work thereafter (at least for a few tries).

Any ideas on why this would be happening in this particular case.

Thanks

Keith



[attachment deleted by admin]

44
Web Server - Ask For Help / Second level menu getting squished
« on: July 22, 2015, 01:03:21 AM »
Hi

I have a Menu Item at Level 1 - FindaResort - which has 5 level 2 items.  The menus are displayed 'open' and all of the items are visible after a user logs in - see picture Menu1.  However if the user contracts the FindaResort item and expands it, there is a squishing - see picture Menu2.

You can sometimes un-squish it by expanding and contracting the other items but no reliably and I couldn't find any setting that I have missed in the template.

There's plenty of real estate - any ideas what I could have done wrong?

Keith

[attachment deleted by admin]

45
Thanks Niels - works perfectly.

Keith

Pages: 1 2 [3] 4 5 ... 21