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 6 ... 21
46
Hi

I have a file which has a field 'Business Type' which can have the values 0-3.  I want to have this field in the Browse but with an alpha decode of the numeric viz 0 means 'Inactive', 1 means 'Free' etc.

So, I added four conditions to the 'Conditional' tab on the template for the field viz: p_web.gsv('FND:BusinessType')=0 and set 'Display' to 'Inactive' with a picture of '@s8' and so on for the other three options.

What was displayed though was 'Inactive' for all of the Browse records whether the 'Business Type' was 0 or not.  The generated code looked good viz:

    if false
    elsif p_web.gsv('FND:BusinessType')=0 ! alternative condition for column
      loc:extra = ''
      packet.append(p_web.DivHeader('browseFindaPet_FND:BusinessType_'&FND:RecordId,,net:crc,,loc:extra))
              packet.append( p_web.CreateHyperLink(p_web._jsok(Left(p_web.mformat('Inactive','@s8')),(Net:HtmlOk*0)+(Net:UnsafeHtmlOk*0)),,,,loc:javascript,,,(Net:HtmlOk*0)+(Net:UnsafeHtmlOk*0),,,'browseFindaPet'))
    elsif p_web.gsv('FND:BusinessType')=1 ! alternative condition for column
      loc:extra = ''
      packet.append(p_web.DivHeader('browseFindaPet_FND:BusinessType_'&FND:RecordId,,net:crc,,loc:extra))
              packet.append( p_web.CreateHyperLink(p_web._jsok(Left(p_web.mformat('Free','@s4')),(Net:HtmlOk*0)+(Net:UnsafeHtmlOk*0)),,,,loc:javascript,,,(Net:HtmlOk*0)+(Net:UnsafeHtmlOk*0),,,'browseFindaPet'))

It looks as if the display should vary depending on the value of FND:BusinessType but it doesn't.

I am obviously misunderstanding something about how this works.

Thanks for any help.

Keith

47
Web Server - Ask For Help / Re: Menus and Mobile
« on: May 11, 2015, 08:50:48 PM »
Kevin

Thanks - am on my way with a Generic page to fan out to Large or small screens.  It will be quite exciting to see what can be achieved to make mobiles workable.

Cheers

Keith

48
Web Server - Ask For Help / Re: Menus and Mobile
« on: May 11, 2015, 02:35:25 PM »
Thanks Kevin.

You showed me (on another thread) how to customise the Home page display (say HomeMobile or Home) via the 'URL' on Save on the Login Form and this works fine and I have now created two sets of procedures one for Mobile and one for not Mobile.

But in my app I do not force users to login (if they don't then they get a restricted set of functionality).  Is there a way to display one or the other Home pages without relying on a Login?  In the Webserver procedure there is the 'Default' Page' that is set to 'Home' but I can't put p_web.gsv('startpage') there (compile errors) and putting code in 'Process link' (in WebHandler)  is too late.

Is this possible.  Thanks

Keith

49
Web Server - Ask For Help / Menus and Mobile
« on: May 10, 2015, 06:39:48 PM »
HI

I am creating a tailored Mobile set of procedures for my app.

I display the Menu, select a Browse and then a Form but the Menu is no longer displayed and the only way to get back to it is via the 'back' arrow on the browser (i.e. when on the form 'back' displays the browse and 'back' again displays the Menu.

Of course, when running in non-mobile mode the menu is always displayed and available.

Is this the way that 'Mobile' works or is there something I am missing?

Thanks

Keith

50
Web Server - Ask For Help / Re: Catering for Mobiles
« on: April 28, 2015, 02:34:42 AM »
Thanks Kevin, Of course.!  I'll start thinking of this myself after a bit more practice.

Cheers

Keith

51
Web Server - Ask For Help / Re: Catering for Mobiles
« on: April 28, 2015, 01:13:49 AM »
Hi Kevin

You said "I actually go to a different indexpage after login with a menu for mobile and all new pages\browses for mobiles."

I can see that on the Login form there is a 'URL on Save' which is set to the Index Page name.  I also see that in the SetFormAction routine in the Login procedure that the variable loc:formaction is set to this value but also modified based on other attributes.

So where do you put code like:

if p_web.IsMoble() = 1 then loc:formaction = 'Other Index Page'.

I'm probably barking up the wrong tree but question is - how do you conditionally set another index page?

Thanks

Keith

52
Web Server - Ask For Help / Re: Catering for Mobiles
« on: April 27, 2015, 02:00:49 PM »
Hi Kevin

Thanks for the pointers.  I had pretty much come to the conclusion that there needed to be new Forms and a new structure for Mobiles but needed confirmation.

Now you said you did a redirect based on whether the device is a Mobile.  I was thinking of how to achieve this - would this work:

At login I set the Level to 1 for a desktop and 2 for a mobile.
This allows me to conditionally display menu items that relate to the connecting device.
And the menu items for Mobile point to new browses and forms and new navigation.

Or, is there a better way?

Thanks

Keith

53
Web Server - Ask For Help / Catering for Mobiles
« on: April 27, 2015, 01:32:48 AM »
Hi

I recently released an app to a selected group of enthusiasts (and have written about it under 'Links to sites'  http://202.78.140.106:24010 ) and I found that a lot of activity was via mobile devices of small screen size.  My app revolves around information displayed on a Form under six tabs of which three are pretty dense in terms of fields which are typically arranged in a tabular format (i.e. labelled rows and columns).

I had imagined that with so much data to display that no one would remotely consider trying to run the app on phone - but they did  >:( 

I have since read as much as I could find about how to cater for Mobiles. I can understand Browses and can easily adjust the template settings per recommendations and that will work well.  But its the Form that is the problem.  I have attached two displays MobileD1 and MobileM1 which show what one of the tabs looks like on a Desktop and on my desktop with 'Force Mobile' mode selected (and the display looks much the same on a real phone).

The other tabs on the form (especially the dense one) are equally unusable.  I suspect that this chaos has something to do with how I have achieved the formatting which for the desktop is well structured and briefly this is what I have done:

The row headings are the prompts for the first fields in the row (for which the column heading is 'RPM')the other fields in the row have a null prompt.  the column headings ('RPM , 'Torque Nm' etc are individual Display fields.  They all line up because they all have the same template attributes 'last in line' = No and 'last in Cell' (except the last one in each row of course).

A couple of questions at this stage - why would the formatting go so horribly wrong on a Mobile and is it even sensible to expect a similar result as for a large real estate device? 

And if the answer is that tabular formatting (at least as I have implemented it) is a no-no for mobiles then does that mean that you would need to develop another application with a different style for them?

Thanks

Keith

[attachment deleted by admin]

54
This is not a new topic really, I have asked this question before but have just come back to it and still can't get it to work.

My original question was how to send the cursor to the login Form Field that was in error (I have three fields on my Form - Business, User and Password).

Bruce said in reply:

"Loc:Invalid is set during validation to the field that you consider to be invalid, and hence the field that will regain the focus. So for example in example 3 the embed code reads;

    loc:invalid = 'Loc:Login'
    p_web.SetValue('retry','LoginForm')
    loc:Alert = 'Login Failed. Try Again.'

which will put the user back on the login field. But it could have been

    loc:invalid = 'Loc:Password'
    p_web.SetValue('retry','LoginForm')
    loc:Alert = 'Login Failed. Try Again.'

which would then put the user back on the password screen.
"

And of course this is perfectly correct, readily understood and is exactly the way that Example 3 works.

BUT - it doesn't work in my application where I code:

                 loc:invalid = 'loc:password'
                 p_web.SetValue('retry','LoginForm1')
                 loc:Alert = 'Invalid password. Try again.'           

The only difference between mine and Web3 is that my Login Form has a different name (but it was derived from the Web3 Form) - not that I think that matters.  What happens is that the Alert message appears and after clicking 'Ok' the cursor cannot be seen and it certainly is not in the Password field.

This is just an irritation but I would like to know what could be different about my Form that would generate this behaviour.

Thanks

Keith


55
Web Server - Ask For Help / Re: Timer procedure from the webserver
« on: March 20, 2015, 12:08:45 PM »
Bill

Great question.  I was contemplating exactly the same approach.  In my case I want to send an email based on actions a user takes on a Form (to change a critical field for example).  The user is not sending the mail but the program logic determines that one is required.  So I was going to add the details to a queue or file and run a process off a Webserver timer to send the mails and mark them (in the file) as 'Sent'.

I do have an unrelated process running off a Timer which periodically creates a CSV file and I guess that unless you can have two Timers that you would just include logic to either perform both actions with the same period or a logic fudge to perform them out of sync.

Haven't coded it yet but will be interested in any advice.

Keith

56
Web Server - Ask For Help / Re: 8.38 Browse problem
« on: March 03, 2015, 05:50:53 PM »
Bruce and Jeff

Attached is an example app (PMTEST) which exhibits the same behaviour as we have reported.
on the login page anything in all three fields will be ok.

Cheers

Keith

[attachment deleted by admin]

57
Web Server - Ask For Help / Re: 8.38 Browse problem
« on: March 03, 2015, 05:45:17 PM »
Bruce and Jeff

Just loaded 8.39 and no change to the behaviour of my application.

Keith

58
Web Server - Ask For Help / Re: Image Caching?
« on: March 02, 2015, 07:26:36 PM »
Bill

What you have described indicates that the value of PLA:PHOTOFRAME after the second (overwriting) file has been 'uploaded' is not being changed to the new file name.

So, if the first photo was <path>\12345.jpg and the second was <path>23456.jpg - that the file 23456.jpg is moved to the folder but the name in the field is still 12345.jpg

You've probably done all this but just check that the file field has changed.  It wont display immediately (after the upload) unless you 'reset' the Image field and it wont change the file value unless you Save the Form.

My comments are probably trivial but I've been down this track and know how frustrating it is.

Cheers

Keith


59
Web Server - Ask For Help / Re: Image Caching?
« on: March 02, 2015, 12:03:54 PM »
Hi Bill

This topic has been canvassed here:

http://www.nettalkcentral.com/index.php?option=com_smf&Itemid=36&topic=6166.0

The critical point is that the rename code needs a wrapper which test whether the code is being executed because of the file upload or the save.  The code is shown in the thread.  There are other factors but this and the NT version you need to be at are the important ones.

Now, I still have an additional problem which may not be related that the image uploads and displays work 100% when testing locally but the images NEVER display when I move my app to a web server where the path is different - but the fully qualified name iw generated correctly.

HTH

Keith

60
Web Server - Ask For Help / Re: Taming the cursor
« on: March 01, 2015, 11:57:53 PM »
This is an old thread but . . .

The code:

  loc:invalid = 'Loc:Login'
  p_web.SetValue('retry','LoginForm')
  loc:Alert = 'Login Failed. Try Again.'

works fine in the Login example app and is the template (as Bruce said above) for posting an error message, retrying the form and selecting the field on that form to continue with (the field in error).

I now have a Form (not a login Form) in which I check a field - CLI:Name and have the following code if the field is in error:

     loc:invalid = 'cli:name'
     p_web.SetValue('retry','u2clients')
     loc:Alert = 'Enter a valid Business Id'

which looks like the example but though the Alert message appears the cli:name field does not get the focus, the cursor remains in the next field.

Any ideas why this should be?

Thanks

Keith


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