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 - jking

Pages: 1 [2] 3 4 ... 27
16
Osquiabro,

     I have this working now.  I am doing the refresh in the GotFocusBack/End embed as follows:

      do refresh::Enr:BCS_Status
      do refresh::Enr:BCS_Upstaging
      do refresh::Enr:DCISionRT_Upstaging

For some reason, this embed was not "firing" earlier in my testing.  Works as expected now.

Thanks,

Jeff



17
Hi Ron,

     Thanks for your input.  I have tried both the regular table based form and the memory form.  Still, I don't see how to refresh the two fields on the main form, after closing the pop-up form.  I'll keep working on this.

Jeff

18
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

19
Web Server - Ask For Help / Re: Login window not centered
« on: March 06, 2024, 09:00:51 AM »
Hi Bruce,

     I added it to the login-form-width as seen here:


.login-form-width{
   width: 350px;
   line-height: 1.0em;
   margin: 0 auto;
}

Seems to work as needed.

Thanks,

Jeff

20
Web Server - Ask For Help / Re: Re: Save form as user selects tabs?
« on: March 05, 2024, 10:52:45 AM »
Hello all,

     I think I have a fix.  I added an item to my custom css;

                margin: 0 auto;

This has centered the Login Form like before.

Jeff King

21
Web Server - Ask For Help / Login window not centered
« on: March 05, 2024, 08:50:13 AM »
Hi Bruce,

     I updated to NT 14.19.  Now my login form is left justified, see attached.  I have the Form Div set at: ' nt-fix-center login-form-width'.

     Nothing else has changed in my app.  I simply re-compiled after updating to NT 14.19.  With NT 14.13 the login form was centered. 

     I have spent more than an hour trying to fix this without success.  All my NT 14.13 apps now have the login form left justified as does the example app Web3.  Anything change with CSS formatting since NT 14.13?

Thanks,

Jeff

22
Web Server - Ask For Help / Re: Save form as user selects tabs?
« on: March 05, 2024, 06:54:47 AM »
Bruce,

    Thanks!  I found the mention of the new "partial save" button in the release docs of 14.17.  I'll update and try that.  Sounds like exactly what I need.

Jeff

23
Web Server - Ask For Help / Save form as user selects tabs?
« on: March 04, 2024, 06:04:50 PM »
Hello everyone,

     I have a complex form with multiple tabs and many fields on each tab. Using NT 14.13.

     A user has requested that the form save "partial" results to the file as they select the many tabs.  Then, when done, they will select the Save button for a final save to disk.  I created a local routine that I try calling from the Tab Changed embed:

SaveTabContents     ROUTINE
 
    Access:CRF001_Surgeon.Open()
    Access:CRF001_Surgeon.UseFile()
    CRF001Sx:Study_ID = p_web.GSV('CRF001Sx:StudyID_key')
   
    Access:CRF001_Surgeon.Fetch(CRF001Sx:StudyID_key)
   
    p_web.SessionQueueToFile(CRF001_Surgeon)
   
    Access:CRF001_Surgeon.TryUpdate()
    Access:CRF001_Surgeon.Close()
   
    EXIT

     So far, this does not update the file.  Maybe a problem with the code in the routine or I'm using the wrong embed to call this?  Any thoughts?

Thanks,

Jeff King

24
Web Server - Ask For Help / Re: Troubles with conditional hide filter.
« on: February 20, 2024, 06:55:15 PM »
Hi Jane,

     That was it, I needed to be using the session values.  So, I have two fields to hide.  I needed to use both of these in each Hide Condition like this:

p_web.GSV('CRF002Rad:Recommend_RT_PBI') <> 'Other' AND p_web.GSV('CRF002Rad:Recommend_RT_WBI') <> 'Other'


Thanks as always!

Jeff


25
Web Server - Ask For Help / Troubles with conditional hide filter.
« on: February 20, 2024, 05:22:57 PM »
Hello,

     I'm struggling with how to construct the conditional hide on a field in a NT app.  This is what I would like:

CRF002Rad:Recommend_RT_PBI  <> 'Other'   OR
CRF002Rad:Recommend_RT_WBI <> 'Other'

I know this has to be a string so I have tried the following:

'CRF002Rad:Recommend_RT_PBI  <> Other OR ' &
'CRF002Rad:Recommend_RT_WBI <> Other'

Still getting errors.  Can anyone help me construct this properly?

Thanks,

Jeff King

26
Web Server - Ask For Help / Re: New API troubles
« on: February 19, 2024, 08:43:00 PM »
Hi Bruce,

     I have the following code in the ServiceMethod embed:

 Access:Users.Open()
 Access:Users.UseFile()
 Usr:EMail = Clip(EMail)

 
 If Access:Users.Fetch(Usr:EMail_key) = Level:Benign
    EMail = Clip(Usr:EMail)
    Access_List = Clip(Usr:Access_List)
    AcctStatus = Clip(Usr:AcctStatus)
 ELSE
    p_web.AddServiceError(77, '', '', 'The EMail address was not found in the User File!', 'Check the Portal/LIS user account for the proper email address.')
 END


And I'm attempting to test by passing the following URL:

http://127.0.0.1:88/EDC_API/EDC_Users?EMail=jking@health.usf.edu

I'm still getting nothing returned.

Also, when using a local variable, the documentation does not have any "Try It" sections so I can set the EMail variable and do some testing.  See attached image.  Is this expected with local variables as parameters?

Thanks,

Jeff

27
Web Server - Ask For Help / Re: New API troubles
« on: February 19, 2024, 06:13:06 PM »
Bruce,

     Should I put the code in the ServiceMethod embed?

Thanks,

Jeff

28
Web Server - Ask For Help / New API troubles
« on: February 19, 2024, 06:01:08 PM »
Hello all,

     I'm trying a new API in my app.  I have a Users file, and I want to use an API to see if there is an email address in this file.  I want to do a get, see if the email is in the file and then return three fields. 

     On the Parameters tab, I set the parameter type to table, set the table to Users.tps, choose the unique key on the email field, and then check Allow Read.

     On the Returns tab, I set the three fields in the Users table I want to return.  They are:  Usr:EMail, Usr:Access_List and Usr:AcctStatus

The response I get back is:

{
   "EDC_Users_response" : {
      "Usr:EMail" : "",
      "Usr:Access_List" : "",
      "Usr:AcctStatus" : ""
   }
}

     In the "Try It" section of the API documentation, HTTP GET (JSON Response), I set the Usr:Email field to jking@health.usf.edu and this email record does exist in the Users tps file.  I would expect the get to succeed and return the three fields.  Still, I get empty fields.  I can't seem to find where I'm going wrong.  Any thoughts?

Thanks,

Jeff King

29
Web Server - Ask For Help / Re: Help with NT 14.13 API
« on: February 08, 2024, 04:28:31 PM »
Hi Bruce and Ron,

   Here is what I'm doing now, after looking at the flow in the generated source:

1.  The InsertRecord:PatientEnrollment routine has the following code at the beginning:

   code
  ! Start of "Start of InsertRecord: Routine"
  ! [Priority 5000]
 
  ! End of "Start of InsertRecord: Routine"
  Clear(Enr:Record)
  do QueueToFile:PatientEnrollment
  TableAction = 'insert'
  do PrimeFields:PatientEnrollment
  Do ValidateRecord:PatientEnrollment
  If err = 0
    Get(PatientEnrollment,0) ! Prime duplicate checking for Insert
    errString = p_web.CheckForDuplicates(PatientEnrollment)
    if ErrString
      ! Start of "InsertRecord Duplicate Detected"
      ! [Priority 5000]
     
      ! End of "InsertRecord Duplicate Detected"
      Err = DupKeyErr
      p_web.AddServiceError(DupKeyErr,'EDC_Enrollment', p_web.RecordIdentifier(PatientEnrollment), clip(ErrString),'')
      p_web.trace('EDC_Enrollment -- InsertRecord:PatientEnrollment -- Error Inserting: ' & ErrString)
    Else
      ! Start of "InsertRecord Before Add"
      ! [Priority 4000]

   
   The "If err = 0", is where I think I can cause the InsertRecord routine to run conditionally.  The ValidateRecord routine is run just before this.  So, in the End of ValidateRecord embed I placed the following:

   Ins:Institution_ID = Enr:Institution_ID
         If Access:Institution.Fetch(Ins:InstID_key) <> Level:Benign     
          err = 1       
          p_web.AddServiceError(999, '', 'Inst ID Not found:', '', 'Check Institution ID')
         ELSE
          !
         END


   This allows me to check the incoming Institution_ID and if not valid, I set err = 1.  This causes most of the "Insert" code in the InsertRecord routine to be skipped, and an error message is sent back to the client, 'Inst ID Not found:'.

Finally, in the InsertRecord Before Add embed, I have the following code:

     Ins:Institution_ID = Enr:Institution_ID
          If Access:Institution.Fetch(Ins:InstID_key) = Level:Benign             
              Access:PatientEnrollment.PrimeAutoInc()   
              !Access:PatientEnrollment.PrimeRecord(1)
              Enr:Study_ID = 'Z'&Format(Enr:Institution_ID, '@N02')&'-'&Format(Enr:Patient_ID, '@N04')         
          END

This primes the auto-numbered field Patient_ID properly and the Study_ID is constructed and passed back to the client.  Let me know if you have any thoughts or comments on ways I might do this better.

Thanks,

Jeff

30
Web Server - Ask For Help / Re: Help with NT 14.13 API
« on: February 06, 2024, 09:24:03 AM »
Hi Ron and Bruce,

     Your suggestions have pointed me in the right direction.  I believe I have a solution.  I'm refining code and will report back when I think it is ready.

Thanks,

Jeff

Pages: 1 [2] 3 4 ... 27