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.
1
Web Server - Ask For Help / Re: Browse filtering using timestamp field
« on: Today at 03:27:42 AM »
Hi,
What I do with complex filters is place them in the embed 2 - Before Browse Loop ---10a Set Filter. Photo attached. I put them here instead of in the template Filter line if they are complex
The filter is just a string.
When writing complex filters I will often build a string and check the string.
The filter you want is loc:FilterWas - that will hold your new filter.
Here is some example code:
if p_web.GSV('FROM') = 'OWNER'
if p_web.GSV('loc:datepick')> 0 ! we have chosen a date range
if daterange> 0 ! we have chosen a date range
if daterange = 1
filterstring = 'JSRV:TDATE = ' & onedate & ' AND ' & 'UPPER(JSRV:OWNR_GUID) = <39>' & UPPER(p_web.GSV('LOGGED OWNER_GUID')) & '<39>'
loc:FilterWas = filterstring
elsif daterange = 2
filterstring = 'JSRV:TDATE >= ' & dfrom & ' AND JSRV:TDATE <= ' & dto & ' AND ' & 'UPPER(JSRV:OWNR_GUID) = <39>' & UPPER(p_web.GSV('LOGGED OWNER_GUID')) & '<39>'
loc:FilterWas = filterstring
end
end
else ! no date range - standard inquiry - show last 30 days
!loc:FilterWas = 'UPPER(JSRV:OWNR_GUID) = <39>' & UPPER(p_web.GSV('LOGGED OWNER_GUID')) & '<39>' ! go back 30 days on routine request
filterstring = 'UPPER(JSRV:OWNR_GUID) = <39>' & UPPER(p_web.GSV('LOGGED OWNER_GUID')) & '<39>' & ' AND JSRV:TDATE >= ' & today() -30 & ' AND JSRV:TDATE <= ' & today()
loc:FilterWas = filterstring
end
Hope this helps you get squared away.
Ron
What I do with complex filters is place them in the embed 2 - Before Browse Loop ---10a Set Filter. Photo attached. I put them here instead of in the template Filter line if they are complex
The filter is just a string.
When writing complex filters I will often build a string and check the string.
The filter you want is loc:FilterWas - that will hold your new filter.
Here is some example code:
if p_web.GSV('FROM') = 'OWNER'
if p_web.GSV('loc:datepick')> 0 ! we have chosen a date range
if daterange> 0 ! we have chosen a date range
if daterange = 1
filterstring = 'JSRV:TDATE = ' & onedate & ' AND ' & 'UPPER(JSRV:OWNR_GUID) = <39>' & UPPER(p_web.GSV('LOGGED OWNER_GUID')) & '<39>'
loc:FilterWas = filterstring
elsif daterange = 2
filterstring = 'JSRV:TDATE >= ' & dfrom & ' AND JSRV:TDATE <= ' & dto & ' AND ' & 'UPPER(JSRV:OWNR_GUID) = <39>' & UPPER(p_web.GSV('LOGGED OWNER_GUID')) & '<39>'
loc:FilterWas = filterstring
end
end
else ! no date range - standard inquiry - show last 30 days
!loc:FilterWas = 'UPPER(JSRV:OWNR_GUID) = <39>' & UPPER(p_web.GSV('LOGGED OWNER_GUID')) & '<39>' ! go back 30 days on routine request
filterstring = 'UPPER(JSRV:OWNR_GUID) = <39>' & UPPER(p_web.GSV('LOGGED OWNER_GUID')) & '<39>' & ' AND JSRV:TDATE >= ' & today() -30 & ' AND JSRV:TDATE <= ' & today()
loc:FilterWas = filterstring
end
Hope this helps you get squared away.
Ron
2
Web Server - Ask For Help / Re: Can you make CheckBoxes with the Button on the Leftt and Text on the Right ?
« on: December 02, 2024, 11:40:48 AM »
HI,
Also found that you can use the Check Box Tab for a check box and use the True Text and False Text to get the same result except the text is now inside the button !
Check box field is Byte - 0/1
Ron
Also found that you can use the Check Box Tab for a check box and use the True Text and False Text to get the same result except the text is now inside the button !
Check box field is Byte - 0/1
Ron
3
Web Server - Ask For Help / Re: Can you make CheckBoxes with the Button on the Leftt and Text on the Right ?
« on: December 02, 2024, 09:49:16 AM »
Mike,
This is a clearer example of having check on LEFT and text on right. I have a screen shot of template ( Hide Prompt and put Text in COMMENT and SHOW comment only).
Ron
BTW - the Layout for this Form is TABLE ( not Grid or Flex)
Ron
This is a clearer example of having check on LEFT and text on right. I have a screen shot of template ( Hide Prompt and put Text in COMMENT and SHOW comment only).
Ron
BTW - the Layout for this Form is TABLE ( not Grid or Flex)
Ron
4
Web Server - Ask For Help / Close BROWSE procedure
« on: November 29, 2024, 03:16:56 AM »
Hi,
C11.0.136 NT 14.21
Bruce offered this to close a FORM ===> p_web.ntform(loc:formName,'clickClose')
However, this appears to be for FORMS only. This appears in Browse code but appears to refer to the FORM for the browse
Question: How do I close a NT BROWSE procedure in code?
Thanks,
Ron
C11.0.136 NT 14.21
Bruce offered this to close a FORM ===> p_web.ntform(loc:formName,'clickClose')
However, this appears to be for FORMS only. This appears in Browse code but appears to refer to the FORM for the browse
Question: How do I close a NT BROWSE procedure in code?
Thanks,
Ron
5
Web Server - Ask For Help / Re: h2 Header styling - trying to apply color
« on: November 22, 2024, 02:23:41 AM »
THanks Jane,
I kept trying it with a .h2 and .<h2> , etc and could not get it to work in my custom css. In line worked once I added the span tag.
Thanks for the help on getting this in my custom css.
Ron
I kept trying it with a .h2 and .<h2> , etc and could not get it to work in my custom css. In line worked once I added the span tag.
Thanks for the help on getting this in my custom css.
Ron
6
Web Server - Ask For Help / Re: I have a PopUp Form with an AutoStart Button can I autoClose after done ?
« on: November 22, 2024, 02:21:23 AM »
HI Mike,
I use the code p_web.Script( p_web.WindowOpen( 'YourProcedure')) in several ways.
1. I have a button which selects a line from a browse to use as a reference during the session.
when the user presses this button and my code is done the last line of my code can be - p_web.Script( p_web.WindowOpen( 'IndexPage')) and it will go there. However, I prefer the second approach.
2. The same browse is called from two different procedures which are menus. To return to the menu which called this browse I pass a paramenter - 'IR=YES' or 'IR=YES_SM' .
in the browse, % BeforeFormTag/5000 embed:
if P_web.gsv('loc:IR') = 'YES' or P_web.gsv('loc:IR') = 'YES_SM'
p_web.SSV('SubHeading', 'Please Select Auto Dealership for this Service!')
! loc:selecting = true
end
IF P_web.gsv('loc:IR') = 'YES_SM'
loc:CloseAction = 'A_MOBILEBUTTON_MEMFORM' ! call small menu
else
loc:CloseAction = 'INDEXPAGE' ! go back to index page for large menu
END
This is where the action is set to perform when the Close Button is pressed. So, when the user picks a record. I pop up a message that identifies the chosen record and then prompts them to press the CLOSE button. I prefer code 2 so that I make sure that each procedure I open is closed correctly.
[Behind the scenes. How did I get there... I put the procedure name to run in the Template when the close button is pressed. I then looked at the code and the Close button uses loc:CloseAction as a reference to the procedure to run when CLOSE is pressed. I then looked at where the template assigned the value to the loc:CloseAction. It is way up in the code before calling the form tag. So, right after the Template assigned it, I popped in my code to overwrite that assignment to the one I wanted to be run - hence, the code above....]
Ron
I use the code p_web.Script( p_web.WindowOpen( 'YourProcedure')) in several ways.
1. I have a button which selects a line from a browse to use as a reference during the session.
when the user presses this button and my code is done the last line of my code can be - p_web.Script( p_web.WindowOpen( 'IndexPage')) and it will go there. However, I prefer the second approach.
2. The same browse is called from two different procedures which are menus. To return to the menu which called this browse I pass a paramenter - 'IR=YES' or 'IR=YES_SM' .
in the browse, % BeforeFormTag/5000 embed:
if P_web.gsv('loc:IR') = 'YES' or P_web.gsv('loc:IR') = 'YES_SM'
p_web.SSV('SubHeading', 'Please Select Auto Dealership for this Service!')
! loc:selecting = true
end
IF P_web.gsv('loc:IR') = 'YES_SM'
loc:CloseAction = 'A_MOBILEBUTTON_MEMFORM' ! call small menu
else
loc:CloseAction = 'INDEXPAGE' ! go back to index page for large menu
END
This is where the action is set to perform when the Close Button is pressed. So, when the user picks a record. I pop up a message that identifies the chosen record and then prompts them to press the CLOSE button. I prefer code 2 so that I make sure that each procedure I open is closed correctly.
[Behind the scenes. How did I get there... I put the procedure name to run in the Template when the close button is pressed. I then looked at the code and the Close button uses loc:CloseAction as a reference to the procedure to run when CLOSE is pressed. I then looked at where the template assigned the value to the loc:CloseAction. It is way up in the code before calling the form tag. So, right after the Template assigned it, I popped in my code to overwrite that assignment to the one I wanted to be run - hence, the code above....]
Ron
7
Web Server - Ask For Help / Re: h2 Header styling - trying to apply color
« on: November 21, 2024, 03:23:04 AM »
HI Vinnie,
Thanks - I was missing the span ... /span part of it.
Got it working.
Ron
Thanks - I was missing the span ... /span part of it.
Got it working.
Ron
8
Web Server - Ask For Help / h2 Header styling - trying to apply color
« on: November 20, 2024, 04:43:37 PM »
Hi,
I am trying to apply red color to the h2 header - I tried in-line styling which did not work. I want the header h2 line to always be red at the top of the page.
Anyone done this and willing to share?
Thanks,
Ron
I am trying to apply red color to the h2 header - I tried in-line styling which did not work. I want the header h2 line to always be red at the top of the page.
Anyone done this and willing to share?
Thanks,
Ron
9
Web Server - Ask For Help / Re: Issues displaying NetTalk camera images in a Windows application.
« on: November 11, 2024, 03:11:26 AM »
HI, NT stores the pictures in the images folder under the web folder as PMG files. NT apps should be able to save to BLOB and to the images folder. Can you access the png images in the images folder. You should be able to view these images on your NT server with any program which will open a graphic. If you can do this, try your windows APP. It should be able to open this as well.
I am not sure what you are really trying to say about your image in a BLOB and your windows application. However, Web applications can open images delivered from blobs almost natively. That does NOT exist in desktop applications. On desktop, try using BlobToFile in String theory and save it to disk and use that image file in your web app. You can delete the image file when procedure is done.
Maybe this will get you started.
Ron
I am not sure what you are really trying to say about your image in a BLOB and your windows application. However, Web applications can open images delivered from blobs almost natively. That does NOT exist in desktop applications. On desktop, try using BlobToFile in String theory and save it to disk and use that image file in your web app. You can delete the image file when procedure is done.
Maybe this will get you started.
Ron
10
Web Server - Ask For Help / Re: Can you make CheckBoxes with the Button on the Leftt and Text on the Right ?
« on: November 07, 2024, 01:52:11 AM »
Mike,
Templates have a LOT in them. A lot of things are not what they seem to be. You just have to ask questions and experiment! Incredible stuff is doable with NT and even more with NT and css. I try to do as much in NT as I can. My custom.css is very tiny.
Ron
Templates have a LOT in them. A lot of things are not what they seem to be. You just have to ask questions and experiment! Incredible stuff is doable with NT and even more with NT and css. I try to do as much in NT as I can. My custom.css is very tiny.
Ron
11
Web Server - Ask For Help / Re: Can you make CheckBoxes with the Button on the Leftt and Text on the Right ?
« on: November 06, 2024, 04:45:17 AM »
i Mike,
I am doing that with native NT. Initially, I had a consultant help me and he did it in css by working around the NT css as custom css. That was somewhat fragile so I deleted the custom CSS and did this in NT alone:
Checkbox at left. Description at right. Now, I don't have to fudge css every time I want to play with it.
I have attached some screen pics to help explain.
Ron
I am doing that with native NT. Initially, I had a consultant help me and he did it in css by working around the NT css as custom css. That was somewhat fragile so I deleted the custom CSS and did this in NT alone:
Checkbox at left. Description at right. Now, I don't have to fudge css every time I want to play with it.
I have attached some screen pics to help explain.
Ron
12
Web Server - Ask For Help / Re: Can you make CheckBoxes with the Button on the Leftt and Text on the Right ?
« on: November 03, 2024, 10:02:24 AM »
HI Mike,
Where do you want to make them? Forms?, Browses? Anywhere? Do you want to be more specific? Do you want to do these in plain Net Talk or do you want to use css?
Ron
Where do you want to make them? Forms?, Browses? Anywhere? Do you want to be more specific? Do you want to do these in plain Net Talk or do you want to use css?
Ron
13
Web Server - Ask For Help / Re: How to change name of output PDF report?
« on: October 20, 2024, 06:43:33 AM »
Hi Jeff,
I use an Embed "RenameFile PROCEDURE in the Web Handler - after Parent call: ( this renames a file and sets the correct path for the chosen data set)
!MESSAGE('pname ' & p_name)
if p_name = 'upfilename' ! uploading schedule file
locpath = p_web.GSV('tProvRptDir') ! this is the provider file
! message('report dir ' & locpath)
locpath = clip(locpath) & '\INFILE\' ! this adds the Infile path
! message('upload path: ' & locpath)
RETURNVALUE = Parent.RenameFile(p_name,p_filename,locpath)
RETURN RETURNVALUE
END
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Second: This sends a file which is stored in a BLOB - get the blob, check it to see if it holds a file, if it does then extract it and send it
WebHandler - -SendFile PROCEDURE
Data section:
blobname StringTheory
sendstring StringTheory
CODE - Before Parent Call
!! working on generic code in the class to do this. This is for making a file from BLOB to send
Access:Blobfile.Open()
Access:Blobfile.UseFile()
blobname.SetValue(sub(p_FileName,len(clip(self.site.WebFolderPath)) + 2,255))
if blobname.sub(1,1) = '/' then blobname.setvalue(blobname.sub(2,255)).
blobname.replace('/','\')
BF:FileName = blobname.GetValue()
If Access:Blobfile.Fetch(BF:NameKey) = 0
sendstring.FromBlob(BF:Bin)
! allows the browser to cache this file.
! self.ForceNoCache = false
self.HeaderDetails.CacheControl = ''
self.FileDate = today() - 200
self.FileTime = 6000 !clock()
! or tell browser not to cache file
self.ForceNoCache = true
! end of cache settings
self.SendString(sendString,1,0,true)
loc:done = true
End
Access:Blobfile.Close()
If loc:done then return.
-------------------------------------------------------------------
Hopefully these two code snippets will help you get done what you need to get done.
Ron
I use an Embed "RenameFile PROCEDURE in the Web Handler - after Parent call: ( this renames a file and sets the correct path for the chosen data set)
!MESSAGE('pname ' & p_name)
if p_name = 'upfilename' ! uploading schedule file
locpath = p_web.GSV('tProvRptDir') ! this is the provider file
! message('report dir ' & locpath)
locpath = clip(locpath) & '\INFILE\' ! this adds the Infile path
! message('upload path: ' & locpath)
RETURNVALUE = Parent.RenameFile(p_name,p_filename,locpath)
RETURN RETURNVALUE
END
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Second: This sends a file which is stored in a BLOB - get the blob, check it to see if it holds a file, if it does then extract it and send it
WebHandler - -SendFile PROCEDURE
Data section:
blobname StringTheory
sendstring StringTheory
CODE - Before Parent Call
!! working on generic code in the class to do this. This is for making a file from BLOB to send
Access:Blobfile.Open()
Access:Blobfile.UseFile()
blobname.SetValue(sub(p_FileName,len(clip(self.site.WebFolderPath)) + 2,255))
if blobname.sub(1,1) = '/' then blobname.setvalue(blobname.sub(2,255)).
blobname.replace('/','\')
BF:FileName = blobname.GetValue()
If Access:Blobfile.Fetch(BF:NameKey) = 0
sendstring.FromBlob(BF:Bin)
! allows the browser to cache this file.
! self.ForceNoCache = false
self.HeaderDetails.CacheControl = ''
self.FileDate = today() - 200
self.FileTime = 6000 !clock()
! or tell browser not to cache file
self.ForceNoCache = true
! end of cache settings
self.SendString(sendString,1,0,true)
loc:done = true
End
Access:Blobfile.Close()
If loc:done then return.
-------------------------------------------------------------------
Hopefully these two code snippets will help you get done what you need to get done.
Ron
14
Web Server - Ask For Help / Re: checkboxes and radio buttons
« on: October 18, 2024, 03:29:23 AM »
Mike,
Maybe look at the page in developer mode and see what is happening in css for respective form. Getting overwritten by different settings in form? You may have to tweak the custom css - especially if you are playing with the built in nt identifiers and not your unique one.
Ron
Maybe look at the page in developer mode and see what is happening in css for respective form. Getting overwritten by different settings in form? You may have to tweak the custom css - especially if you are playing with the built in nt identifiers and not your unique one.
Ron
15
Web Server - Ask For Help / Re: Change background color of entire app
« on: October 15, 2024, 05:33:37 PM »
Jeff,
This CSS thing is for the young kids - not for old guys like me! Anyway, there are so many things going on here. The first question I have is did you get the css into your working custom.css file? You can look at the web page and put it in developers mode ( IE or Firefox. I have started using Stylizer 7 for some work as I learn css) - is your NEW CODE in the css? Is it being over written? if it is there, what is overwriting it?
That is supposed to be the power of css - one change and voila - the whole site is transformed.
Th --site--background is a built in variable I think.
This will give you a start. BTW, I hired a young kid to help me move around CSS - was well worth it. ( These kids will make a web site do all kinds of tricks - but they don't have a clue about the data behind it and what it represents or how to manage it. My 2 cents...
Ron
This CSS thing is for the young kids - not for old guys like me! Anyway, there are so many things going on here. The first question I have is did you get the css into your working custom.css file? You can look at the web page and put it in developers mode ( IE or Firefox. I have started using Stylizer 7 for some work as I learn css) - is your NEW CODE in the css? Is it being over written? if it is there, what is overwriting it?
That is supposed to be the power of css - one change and voila - the whole site is transformed.
Th --site--background is a built in variable I think.
This will give you a start. BTW, I hired a young kid to help me move around CSS - was well worth it. ( These kids will make a web site do all kinds of tricks - but they don't have a clue about the data behind it and what it represents or how to manage it. My 2 cents...
Ron