Sage 100

 View Only
Expand all | Collapse all

Custom Office - am I losing my mind or can I reall

  • 1.  Custom Office - am I losing my mind or can I reall

    Posted 07-18-2018 19:10
    Custom Office - am I losing my mind or can I really not change the title for a field in a data entry grid? I want to change the name of the Required Date field to Dock Date on the Purchase Order Lines panel.


  • 2.  RE: Custom Office - am I losing my mind or can I reall

    Posted 07-18-2018 19:13
    I just tried. It is late and I am tired but I don't see a way but I also feel like I should have noticed this before now that you have pointed it out.


  • 3.  RE: Custom Office - am I losing my mind or can I reall

    Posted 07-18-2018 19:14
    I agree with @LarryBradford


  • 4.  RE: Custom Office - am I losing my mind or can I reall

    Posted 07-18-2018 19:24
    I'll second being unable to see a way to change it with Customizer but pretty sure it could be done with a UI Post Load event script on the lines panel but don't have time to drill down into at the moment.


  • 5.  RE: Custom Office - am I losing my mind or can I reall

    Posted 07-19-2018 10:43
    I too ran into this a little ways back: https://90minds-com.socialcast.com/messages/32857936?ref=stream


  • 6.  RE: Custom Office - am I losing my mind or can I reall

    Posted 07-19-2018 11:10
      |   view attached
    You can but it isn't pretty. Here is an example with it side by side. The original and the changed. The issue is that you can't control the format of the date. You do get a date lookup button but you can't tell it to be formatted. The way to do it is to go to the grid definition and Add it in the Add fields tab. You would select the Required Date and enter the description as Dock Date. Then go to the Hide columns tab and hide the original. When you do this it will show when the PO is a master/repeat, where it would normally hide.


  • 7.  RE: Custom Office - am I losing my mind or can I reall

    Posted 07-19-2018 11:22
    @ToddMartin , i tried that approach last night on v2018 using Customizer and i got the message that the field was already in the grid.


  • 8.  RE: Custom Office - am I losing my mind or can I reall

    Posted 07-19-2018 11:52
    My example in the image is on 2018.


  • 9.  RE: Custom Office - am I losing my mind or can I reall

    Posted 07-19-2018 11:54
    I just tried it again with the same name and it still allowed it to have the same heading.


  • 10.  RE: Custom Office - am I losing my mind or can I reall

    Posted 07-19-2018 12:05
    When you clicked on Add Field, did you click on ""Show all"" and under PO_PurchaseOrderDetail_Bus|Main select RequiredDate? I am trying to recreate the error message you got.


  • 11.  RE: Custom Office - am I losing my mind or can I reall

    Posted 07-19-2018 12:11
    I'm thinking i must have accidentally clicked the main grid instead of the secondary grid when i tried it last night as i just tried it again and got the message when i tried it on GD_Lines but was able to add the column to GD_ADDL.


  • 12.  RE: Custom Office - am I losing my mind or can I reall

    Posted 07-19-2018 19:19
    I was feeling adventurous and got this working on v2015+ using the following on a UI Post Load event script attached to pLines and pLinesW and adapt the first four variables to suit your needs. ``` sColumnNameToFind = ""RequiredDate$"" ' Change this variable to the target column's name in the table. Add a dollar sign suffix if it is a string field. sColumnCaptionToReplace = ""Required Date"" ' Change this variable to the caption as displayed in the grid. sColumnCaptionToReplaceWith = ""Dock Date"" ' Change this variable to the caption you want to use instead of the above caption. aGridsToSearch = Array(""GD_Lines"", ""GD_Addl"") ' Use this array to define the grids you want to search. Get the grid name from the status bar in Customizer after selecting the grid. For Each sGridToSearch in aGridsToSearch sMapID = """" : sCtlName = """" : nGridCtl = 0 : nGridCtl = oUIObj.GetControlID(sGridToSearch, sMapID, sCtlName) sGridIoL = """" : sGridIoL = oScript.Evaluate(""LST(_obj'GetGridIOList$("" & nGridCtl & ""))"") ' This gets the IOList for the current grid in the sGridToSearch variable. nPosistionInIoL = 0 : nPosistionInIoL = InStr(sGridIoL, sColumnNameToFind) ' This looks for your column in the sGridIoL, if found, it will step into the below ""If...Then...Else"" block. If nPosistionInIoL > 0 Then sGridIoL = Left(sGridIoL, nPosistionInIoL - 1) ' This trims the sGridIoL to just before where the sColumnNameToFind was found. nColumnNumber = 0 : nColumnNumber = (UBound(Split(sGridIoL, "","")) + 1) ' This splits the sGridIoL into an array using a comma as the delimiter and then returns the upper bound of the array and adds a one to it. This becomes the column number of the sColumnNameToFind. If nColumnNumber > 0 Then sAttributes = """" : oUIObj.GetColumnAttributes nGridCtl, nColumnNumber, sAttributes ' This gets the attributes for the column number. sAttributes = Replace(sAttributes, ""COLUMNDESC="" & sColumnCaptionToReplace, ""COLUMNDESC="" & sColumnCaptionToReplaceWith) ' Among the attrbutes is the COLUMNDESC, this replace that plus the value in sColumnCaptionToReplace with the value in sColumnCaptionToReplaceWith. oUIObj.SetColumnAttributes nGridCtl, nColumnNumber, sAttributes ' This sets the modified attributes for the column number. End If End If Next ```


  • 13.  RE: Custom Office - am I losing my mind or can I reall

    Posted 07-19-2018 21:17
    @DavidSpeckII - amazing, worked perfectly!! Many thanks for your time and expertise!