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.


Topics - jking

Pages: [1] 2 3 ... 8
1
Web Server - Ask For Help / Modify the lookup procedure?
« on: March 18, 2025, 12:03:09 PM »
Hello everyone,

     I have a client that no longer wants to store dates in his app.  Instead, he wants to store the number of days from a reference date.  I thought I would set a new field to store the number of days and set it as a lookup.  The lookup would call a procedure/memory form that allows the user to enter two dates and calculates the days between them.  This new calculated value should drop into the lookup field.  I use local variables on the memory form to store the dates and do the calculation. 
     I have the memory form called and it calculates the interval between the two dates.  However, upon returning to the lookup field, the interval value is not dropped into the lookup field.  I realize the lookup feature is meant to do a look up into a table but I thought I might be able to get it to do this by setting the lookup field in an embed, just before returning to the lookup field, but so far not able to do this.  Any thoughts on how to make this work or an alternate way to do this?  I prefer the lookup method over adding a button after each field and calling the memory form that way.  That would be too many buttons to add as I have about 30 date fields to convert.

Thanks,

Jeff King

2
Web Server - Ask For Help / How to change name of output PDF report?
« on: October 18, 2024, 03:51:06 PM »
Hello all,

     I have setup a simple Clarion report to output as a PDF using the Clarion Report to PDF template.  I do get the report generated in a new browser tab but when I try to save it to the local drive, it defaults to the name of the report procedure.  I have tried the following code in numerous report procedure embeds without success:

          loc:PDFName = '.\PREDICT2 Study ID Assignment_'&p_web.GSV('Enr:Study_ID')&'.pdf'

     Some of the embeds I have tried:

          PDF (PDFReportGenerator), Setup, after parent call
          Previewer (PrintPreviewClass), OnSaveAs
          Prime Report Options when run in web mode
         

Can anyone tell me how this should be done?

Thanks,

Jeff King


3
Web Server - Ask For Help / Change background color of entire app
« on: October 15, 2024, 04:14:17 PM »
Hello all,

     For a current client, I maintain three versions of an app:  one for training, one for testing and one for production.  They want me to set the background color of the test and training versions to a lighter pastel color.  I thought about adding the following to my custom.css file:

--site-background:e6e6fa;
.nt-body{
   background-color:var(--site-background);
}


     After running the GzipAll.bat, and doing a CTRL-F5, the background color is not changed.  Any thoughts as to where I went wrong?

Thanks,

Jeff King

4
Hello all,

     I'm working on a NT 14.20 app.  I call a NetWebForm procedure to do an insert and a Study_ID field is created and saved.  Upon saving I want to pop up a second form that shows the newly created Study_ID and has a print button.  The print button should call a report that has the new Study_ID and some instructional text.  If the user does not click the print button, they can just close the second form and continue.

     I have tried to adapt the Adding a Report section of the NetTalk Book, 4th edition, but have not been able to get this to work.  Anyone have suggestions on how to do this?

Thank you,

Jeff King

5
Web Server - Ask For Help / NT 14.20 API error
« on: August 31, 2024, 04:10:02 PM »
Hello all,

     I'm getting an error 40 when trying to use an API to delete a record.  I'm trying from the JSON Post example created in the API documentation in my app.
 Please see attached image JSONPOST.png.  I'm confused by the error definition as it indicates trying to save a record when I'm trying to delete a record. 

     Interestingly, the HTTPGET method does delete the record as expected.  See image HTTPGET.png

I cannot see where the issue is in the JSONPOST.  Can anyone help?

Thanks,

Jeff

6
Web Server - Ask For Help / Media field type question, part 4
« on: August 26, 2024, 12:10:04 PM »
Hi Bruce,

     I'm still working on my app with the Media field type on a form.  One thing I have noticed is the Media field stays at the width and height set in the template...that is it is not responsive to resizing the containing form.  Please see the attached image.  Can you suggest a way to make the Media field width be bound to the right margin and the height to be bound to the bottom margin?  I'm looking for some CSS to add to my custom.css file but have not found anything yet.

Thanks,

Jeff King

7
Web Server - Ask For Help / Media field type question, part 3
« on: August 19, 2024, 10:46:57 AM »
Hello all,

     I have the Media field type working pretty well now.  However, I would like to be able to hide or disable certain functions on the Media field menu/tool bar.  For example, I don't want the user to be able to print or save the viewed PDF.  Is it possible to control these menu/tool bar options?

Thanks,

Jeff King

8
Hello,

     In part 1 of this topic, I mentioned I had the Media field type on a tab, of a multi-tab form, to display a PDF document.  This works but is a bit cumbersome, moving between the PDF tab and other tabs where data is to be entered.  Instead, I would like the Media field to display the PDF document to the right of the tabs on the form.
     The only way I can think to do this, is to create a memory form, and place two procedures on it.  One for the actual tabbed update form and one for the display of the PDF in a Media field.  I have this memory form called by the corresponding browse and it does look good.  However, the update form on this memory form, does not do Inserts, Changes, or Deletes.  Is there a way to code this to properly update my target file from the memory form?  I'm looking at the "Browseless Form" section in the NetTalk book, but so far I have not made this work.

Thank you,

Jeff King

9
Hello everyone,

     I have placed a Media field type on the last tab of a multi tab form.  The idea is to allow the user to view a PDF of a report, from which they will do manual data entry.  The source of the PDF documents is in the uploads folder under the web folder.  The Media control will only download the PDF document and not display it.  However, if I place the PDF documents directly in the web folder, they do display as expected.  On the Media field's Media tab, I set the URL to the following:

           '\uploads\'&p_web.GSV('InvPHI:Patient_ID')&'.pdf'

When I put the PDF's in the web folder, I use the following:

           p_web.GSV('InvPHI:Patient_ID')&'.pdf'


The same thing happens in the example app web74.  Can anyone offer a solution?  I really want the PDF's to be in the uploads folder, or some other custom folder, not in the web folder.

Thank you,

Jeff King

10
Web Server - Ask For Help / File Upload button on MemForm
« on: May 23, 2024, 04:12:36 PM »
Hi Bruce,

     I'm trying to use a MemForm, with a single FileUpload button on it, to upload files to the web\uploads folder.  The web log does show the POST /dataupload event but the actual file is not in the uploads folder.  I have tried this running a local exe and also from a server using a dll with the multi-site host.

     I have run the example app, which uses a normal NetWebForm, and the file does get uploaded properly.  Is it possible it won't work with a MemForm?

Thanks,

Jeff King

11
Hello all,

     I have a co-worker who is running NetTalk 14.20 web apps from his MAC with the latest Chrome browser.  When he clicks on a drop list he gets the Chrome "Aw Snap" error 11 message.  See attached image.  The app does work as expected with Safari on this same MAC.  In addition, the app works as expected on his Windows 11 machine.  Anyone have any thoughts on the cause and a fix?

Thanks,

Jeff King

12
Web Server - Ask For Help / API problem, NT 14.20
« on: April 10, 2024, 12:18:47 PM »
Hi Bruce,

     I have an API set up.  An app in California is the client, sending data to a target tps file called Enrollment.tps on a remote server.  Numerous fields are loaded with data but one is not.  It is called BCS_Status.  In looking at the log in the Multi-site host (this app is a dll app) I do see the JSON, which shows the data is there.  See the attached image.  It shows:  "BCS_Status":"DRTBeforeSurgery", circled in blue.

     Using TPSSCAN I view the Enrollment table and see the BCS_Status field is blank.  All other fields contain data as expected.  I don't understand why this field is not assigned.  My API is set up with the Parameters tab with just the Enrollment table added.  The Returns tab just has two fields inserted.  I'm only allowing this API to do an Insert action.

     I can use Postman to send data to this API and all fields are filled in.

     Any thoughts as to why just one field is not filled when it does show in the JSON?

Thanks,

Jeff King

13
Web Server - Ask For Help / Multi-Site host question
« on: March 26, 2024, 05:30:14 AM »
Hi Bruce,

     I have the multi-site host running on two servers.  One host has 8 dll apps running, the other has two dll apps running.  All this runs great.  However, when there is a new version of NetTalk posted, I must recompile the multi-site host and all individual apps with the same version of NetTalk.  Then, copy the dll's and web folders to each server.  This is becoming very time consuming.  Will it ever be possible to mix NT versions of apps in the future?  Or, is there a way to do this now?

Thanks,

Jeff King

14
Hi Bruce,

     I have been experimenting with the Partial Save button added with NT 14.17.  I have a GUID field in my tables, which is set as unique.  This causes a problem: 

     When adding a new record the form is in insert mode.  Clicking the Partial Save button saves the record, including the GUID field and sets the form to change mode.  Upon clicking the Partial Save button again (while in change mode), an error pops up about a duplicate key on the GUID field. 

    Maybe I can add code to change the GUID when using the Partial Save button, but this does not seem to be a good idea.  For now, I have set the Partial Save button to be disabled when in insert mode.  Any thoughts on how to handle this issue better?

Thanks,

Jeff

15
Hello all,

     Using NT 14.19.  I have a form that displays many fields from a table called surgery.  Two fields are also displayed at the bottom, from another table (enrollment), in view only mode, as seen in the attached image.  The custom button on this form calls a "browse less" form as a pop-up, on the enrollment file.  On this form, the two fields can be edited.  Upon returning to the calling form, the fields are not updated.  I would like them to update as soon as returning from the pop-up.  I have tried calling a Do refresh::My:Field from the GotFocusBack embed without success.  How can I refresh the two fields or the entire form when retuning from the pop-up?

Thanks,

Jeff King

Pages: [1] 2 3 ... 8