• udpate record from browse button

    From Joe Tan@21:1/5 to All on Fri Oct 19 08:46:18 2018
    Hi,
    I need to change a field from a browsebox. So by the button the value will change. For the example I put an OK button beside the update button (Insert,change,delete)
    so from the button will change the value of a field that is selected from browsebox.
    Does anyone can tell me how?

    thx,

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sean H@21:1/5 to Joe Tan on Sat Oct 20 16:28:50 2018
    On 20/10/18 01:46, Joe Tan wrote:
    Hi,
    I need to change a field from a browsebox. So by the button the value will change. For the example I put an OK button beside the update button (Insert,change,delete)
    so from the button will change the value of a field that is selected from browsebox.
    Does anyone can tell me how?

    thx,


    Sorry I think something is lost in translation.

    Do you want to call a procedure to do something just like the change
    button? If the ID of the row in the browse is in the hot fields tab of
    the browse then that ID is available to use in any procedure.


    Sean H

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Joe Tan@21:1/5 to Joe Tan on Sat Oct 20 08:43:52 2018
    On Friday, October 19, 2018 at 10:46:20 PM UTC+7, Joe Tan wrote:
    Hi,
    I need to change a field from a browsebox. So by the button the value will change. For the example I put an OK button beside the update button (Insert,change,delete)
    so from the button will change the value of a field that is selected from browsebox.
    Does anyone can tell me how?

    thx,

    Hi Sean,
    Sorry if the translation not good. I've put the hot field but it's still not working. Do you have any example of doing this?

    thanks,

    Joe

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sean H@21:1/5 to Joe Tan on Mon Oct 22 14:09:54 2018
    On 21/10/18 01:43, Joe Tan wrote:
    On Friday, October 19, 2018 at 10:46:20 PM UTC+7, Joe Tan wrote:
    Hi,
    I need to change a field from a browsebox. So by the button the value will change. For the example I put an OK button beside the update button (Insert,change,delete)
    so from the button will change the value of a field that is selected from browsebox.
    Does anyone can tell me how?

    thx,

    Hi Sean,
    Sorry if the translation not good. I've put the hot field but it's still not working. Do you have any example of doing this?

    thanks,

    Joe


    Hi Joe

    I'd like to help but I'm still not sure exactly what you want to do.
    Could you explain a bit more


    Sean H

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Joe Tan@21:1/5 to Sean H on Mon Oct 22 07:09:14 2018
    On Monday, October 22, 2018 at 11:10:01 AM UTC+7, Sean H wrote:
    On 21/10/18 01:43, Joe Tan wrote:
    On Friday, October 19, 2018 at 10:46:20 PM UTC+7, Joe Tan wrote:
    Hi,
    I need to change a field from a browsebox. So by the button the value will change. For the example I put an OK button beside the update button (Insert,change,delete)
    so from the button will change the value of a field that is selected from browsebox.
    Does anyone can tell me how?

    thx,

    Hi Sean,
    Sorry if the translation not good. I've put the hot field but it's still not working. Do you have any example of doing this?

    thanks,

    Joe


    Hi Joe

    I'd like to help but I'm still not sure exactly what you want to do.
    Could you explain a bit more


    Sean H

    Hi Sean,
    Firstly thanks for your help. Actually I have a browse box
    Describe as below :

    Sts Trans.ID Date Amount
    0 ACC001 10-1-2018 2.80
    1 ACC003 11-2-2018 3.00

    Post insert change Delete

    If the sts value is 0 then button will change into "Post".If the button were push the sts value will change into 1 and the button will change into "unpost". Hope you understand..

    Thx,

    Joe

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sean H@21:1/5 to Joe Tan on Tue Oct 23 12:17:46 2018
    On 23/10/18 00:09, Joe Tan wrote:
    On Monday, October 22, 2018 at 11:10:01 AM UTC+7, Sean H wrote:
    On 21/10/18 01:43, Joe Tan wrote:
    On Friday, October 19, 2018 at 10:46:20 PM UTC+7, Joe Tan wrote:
    Hi,
    I need to change a field from a browsebox. So by the button the value will change. For the example I put an OK button beside the update button (Insert,change,delete)
    so from the button will change the value of a field that is selected from browsebox.
    Does anyone can tell me how?

    thx,

    Hi Sean,
    Sorry if the translation not good. I've put the hot field but it's still not working. Do you have any example of doing this?

    thanks,

    Joe


    Hi Joe

    I'd like to help but I'm still not sure exactly what you want to do.
    Could you explain a bit more


    Sean H

    Hi Sean,
    Firstly thanks for your help. Actually I have a browse box
    Describe as below :

    Sts Trans.ID Date Amount
    0 ACC001 10-1-2018 2.80
    1 ACC003 11-2-2018 3.00

    Post insert change Delete

    If the sts value is 0 then button will change into "Post".If the button were push the sts value will change into 1 and the button will change into "unpost". Hope you understand..


    OK I think I've got it. I'm assuming this is using the ABC templates.

    In the embed point for the browse (local objects -> Browse on yourrFile) TakeNewSelection
    After Parent
    Code will be:
    IF sts = 0
    ?ButtonPost{prop:text}='Post'
    ELSE
    ?ButtonPost{prop:text}='UnPost'
    END

    I think that should do it.


    Sean H

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Joe Drive@21:1/5 to Sean H on Tue Oct 23 20:37:43 2018
    On Tuesday, October 23, 2018 at 9:17:53 AM UTC+7, Sean H wrote:
    On 23/10/18 00:09, Joe Tan wrote:
    On Monday, October 22, 2018 at 11:10:01 AM UTC+7, Sean H wrote:
    On 21/10/18 01:43, Joe Tan wrote:
    On Friday, October 19, 2018 at 10:46:20 PM UTC+7, Joe Tan wrote:
    Hi,
    I need to change a field from a browsebox. So by the button the value will change. For the example I put an OK button beside the update button (Insert,change,delete)
    so from the button will change the value of a field that is selected from browsebox.
    Does anyone can tell me how?

    thx,

    Hi Sean,
    Sorry if the translation not good. I've put the hot field but it's still not working. Do you have any example of doing this?

    thanks,

    Joe


    Hi Joe

    I'd like to help but I'm still not sure exactly what you want to do.
    Could you explain a bit more


    Sean H

    Hi Sean,
    Firstly thanks for your help. Actually I have a browse box
    Describe as below :

    Sts Trans.ID Date Amount
    0 ACC001 10-1-2018 2.80
    1 ACC003 11-2-2018 3.00

    Post insert change Delete

    If the sts value is 0 then button will change into "Post".If the button were push the sts value will change into 1 and the button will change into "unpost". Hope you understand..


    OK I think I've got it. I'm assuming this is using the ABC templates.

    In the embed point for the browse (local objects -> Browse on yourrFile) TakeNewSelection
    After Parent
    Code will be:
    IF sts = 0
    ?ButtonPost{prop:text}='Post'
    ELSE
    ?ButtonPost{prop:text}='UnPost'
    END

    I think that should do it.


    Sean H

    Hi Sean,
    Great i'ts working..but if I want to change the sts value what should I do? Can I just put the formula like sts=1 on 'Post' and sts=0 on UnPost?

    thx

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From sandinzz@yahoo.com@21:1/5 to All on Wed Oct 24 02:04:38 2018
    Correction:

    If you set Flat property for this control this will transform check box to button control (similar to button control).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From sandinzz@yahoo.com@21:1/5 to Joe Drive on Wed Oct 24 01:57:51 2018
    On Wednesday, October 24, 2018 at 5:37:44 AM UTC+2, Joe Drive wrote:
    On Tuesday, October 23, 2018 at 9:17:53 AM UTC+7, Sean H wrote:
    On 23/10/18 00:09, Joe Tan wrote:
    On Monday, October 22, 2018 at 11:10:01 AM UTC+7, Sean H wrote:
    On 21/10/18 01:43, Joe Tan wrote:
    On Friday, October 19, 2018 at 10:46:20 PM UTC+7, Joe Tan wrote:
    Hi,
    I need to change a field from a browsebox. So by the button the value will change. For the example I put an OK button beside the update button (Insert,change,delete)
    so from the button will change the value of a field that is selected from browsebox.
    Does anyone can tell me how?

    thx,

    Hi Sean,
    Sorry if the translation not good. I've put the hot field but it's still not working. Do you have any example of doing this?

    thanks,

    Joe


    Hi Joe

    I'd like to help but I'm still not sure exactly what you want to do.
    Could you explain a bit more


    Sean H

    Hi Sean,
    Firstly thanks for your help. Actually I have a browse box
    Describe as below :

    Sts Trans.ID Date Amount
    0 ACC001 10-1-2018 2.80
    1 ACC003 11-2-2018 3.00

    Post insert change Delete

    If the sts value is 0 then button will change into "Post".If the button were push the sts value will change into 1 and the button will change into "unpost". Hope you understand..


    OK I think I've got it. I'm assuming this is using the ABC templates.

    In the embed point for the browse (local objects -> Browse on yourrFile) TakeNewSelection
    After Parent
    Code will be:
    IF sts = 0
    ?ButtonPost{prop:text}='Post'
    ELSE
    ?ButtonPost{prop:text}='UnPost'
    END

    I think that should do it.


    Sean H

    Hi Sean,
    Great i'ts working..but if I want to change the sts value what should I do? Can I just put the formula like sts=1 on 'Post' and sts=0 on UnPost?

    thx

    Hi.
    You can create local or global variable:
    choose type BYTE and set "Must be true or false" on Validity Checks tab (for true value set 1, for False value set 0).
    Populate the window with this variable - you'll get check box control.
    If you set Flat property for this control this will transform check box to box control (similar to box control).
    Every checking / unchecking will automatically change the value of the variable.
    You can add appropriate code in "Actions -> Embeds" ...

    Hope it helps.
    Zoran.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sean H@21:1/5 to Joe Drive on Thu Oct 25 09:16:05 2018
    On 24/10/18 13:37, Joe Drive wrote:
    On Tuesday, October 23, 2018 at 9:17:53 AM UTC+7, Sean H wrote:
    On 23/10/18 00:09, Joe Tan wrote:
    On Monday, October 22, 2018 at 11:10:01 AM UTC+7, Sean H wrote:
    On 21/10/18 01:43, Joe Tan wrote:
    On Friday, October 19, 2018 at 10:46:20 PM UTC+7, Joe Tan wrote:
    Hi,
    I need to change a field from a browsebox. So by the button the value will change. For the example I put an OK button beside the update button (Insert,change,delete)
    so from the button will change the value of a field that is selected from browsebox.
    Does anyone can tell me how?

    thx,

    Hi Sean,
    Sorry if the translation not good. I've put the hot field but it's still not working. Do you have any example of doing this?

    thanks,

    Joe


    Hi Joe

    I'd like to help but I'm still not sure exactly what you want to do.
    Could you explain a bit more


    Sean H

    Hi Sean,
    Firstly thanks for your help. Actually I have a browse box
    Describe as below :

    Sts Trans.ID Date Amount
    0 ACC001 10-1-2018 2.80
    1 ACC003 11-2-2018 3.00

    Post insert change Delete

    If the sts value is 0 then button will change into "Post".If the button were push the sts value will change into 1 and the button will change into "unpost". Hope you understand..


    OK I think I've got it. I'm assuming this is using the ABC templates.

    In the embed point for the browse (local objects -> Browse on yourrFile)
    TakeNewSelection
    After Parent
    Code will be:
    IF sts = 0
    ?ButtonPost{prop:text}='Post'
    ELSE
    ?ButtonPost{prop:text}='UnPost'
    END

    I think that should do it.


    Sean H

    Hi Sean,
    Great i'ts working..but if I want to change the sts value what should I do? Can I just put the formula like sts=1 on 'Post' and sts=0 on UnPost?

    thx


    Do you want to change it in the file?
    you can call a source procedure that updates that record. You might
    need to refresh the browse after the change.


    Sean H

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Joe Tan@21:1/5 to Sean H on Mon Oct 29 07:45:38 2018
    On Thursday, October 25, 2018 at 6:16:13 AM UTC+7, Sean H wrote:
    On 24/10/18 13:37, Joe Drive wrote:
    On Tuesday, October 23, 2018 at 9:17:53 AM UTC+7, Sean H wrote:
    On 23/10/18 00:09, Joe Tan wrote:
    On Monday, October 22, 2018 at 11:10:01 AM UTC+7, Sean H wrote:
    On 21/10/18 01:43, Joe Tan wrote:
    On Friday, October 19, 2018 at 10:46:20 PM UTC+7, Joe Tan wrote:
    Hi,
    I need to change a field from a browsebox. So by the button the value will change. For the example I put an OK button beside the update button (Insert,change,delete)
    so from the button will change the value of a field that is selected from browsebox.
    Does anyone can tell me how?

    thx,

    Hi Sean,
    Sorry if the translation not good. I've put the hot field but it's still not working. Do you have any example of doing this?

    thanks,

    Joe


    Hi Joe

    I'd like to help but I'm still not sure exactly what you want to do. >>>> Could you explain a bit more


    Sean H

    Hi Sean,
    Firstly thanks for your help. Actually I have a browse box
    Describe as below :

    Sts Trans.ID Date Amount
    0 ACC001 10-1-2018 2.80
    1 ACC003 11-2-2018 3.00

    Post insert change Delete

    If the sts value is 0 then button will change into "Post".If the button were push the sts value will change into 1 and the button will change into "unpost". Hope you understand..


    OK I think I've got it. I'm assuming this is using the ABC templates.

    In the embed point for the browse (local objects -> Browse on yourrFile) >> TakeNewSelection
    After Parent
    Code will be:
    IF sts = 0
    ?ButtonPost{prop:text}='Post'
    ELSE
    ?ButtonPost{prop:text}='UnPost'
    END

    I think that should do it.


    Sean H

    Hi Sean,
    Great i'ts working..but if I want to change the sts value what should I do? Can I just put the formula like sts=1 on 'Post' and sts=0 on UnPost?

    thx


    Do you want to change it in the file?
    you can call a source procedure that updates that record. You might
    need to refresh the browse after the change.


    Sean H

    Hi Sean,

    I have put an syntax on the buttom :

    IF PRH:sts=0 then
    PRH:sts=1
    Access:prheader.update()
    BRW1.ResetSort(1)
    BRW1.UpdateWindow
    End

    IF PRH:sts=1 then
    PRH:sts=0
    Access:prheader.update()
    BRW1.ResetSort(1)
    BRW1.UpdateWindow
    End

    But it still not working, do you have any suggestion to solve the problems?

    thx,

    Joe

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sean H@21:1/5 to Joe Tan on Tue Oct 30 09:50:24 2018
    On 30/10/18 00:45, Joe Tan wrote:
    On Thursday, October 25, 2018 at 6:16:13 AM UTC+7, Sean H wrote:
    On 24/10/18 13:37, Joe Drive wrote:
    On Tuesday, October 23, 2018 at 9:17:53 AM UTC+7, Sean H wrote:
    On 23/10/18 00:09, Joe Tan wrote:
    On Monday, October 22, 2018 at 11:10:01 AM UTC+7, Sean H wrote:
    On 21/10/18 01:43, Joe Tan wrote:
    On Friday, October 19, 2018 at 10:46:20 PM UTC+7, Joe Tan wrote: >>>>>>>> Hi,
    I need to change a field from a browsebox. So by the button the value will change. For the example I put an OK button beside the update button (Insert,change,delete)
    so from the button will change the value of a field that is selected from browsebox.
    Does anyone can tell me how?

    thx,

    Hi Sean,
    Sorry if the translation not good. I've put the hot field but it's still not working. Do you have any example of doing this?

    thanks,

    Joe


    Hi Joe

    I'd like to help but I'm still not sure exactly what you want to do. >>>>>> Could you explain a bit more


    Sean H

    Hi Sean,
    Firstly thanks for your help. Actually I have a browse box
    Describe as below :

    Sts Trans.ID Date Amount
    0 ACC001 10-1-2018 2.80
    1 ACC003 11-2-2018 3.00

    Post insert change Delete

    If the sts value is 0 then button will change into "Post".If the button were push the sts value will change into 1 and the button will change into "unpost". Hope you understand..


    OK I think I've got it. I'm assuming this is using the ABC templates. >>>>
    In the embed point for the browse (local objects -> Browse on yourrFile) >>>> TakeNewSelection
    After Parent
    Code will be:
    IF sts = 0
    ?ButtonPost{prop:text}='Post'
    ELSE
    ?ButtonPost{prop:text}='UnPost'
    END

    I think that should do it.


    Sean H

    Hi Sean,
    Great i'ts working..but if I want to change the sts value what should I do? Can I just put the formula like sts=1 on 'Post' and sts=0 on UnPost?

    thx


    Do you want to change it in the file?
    you can call a source procedure that updates that record. You might
    need to refresh the browse after the change.


    Sean H

    Hi Sean,

    I have put an syntax on the buttom :

    IF PRH:sts=0 then
    PRH:sts=1
    Access:prheader.update()
    BRW1.ResetSort(1)
    BRW1.UpdateWindow
    End

    IF PRH:sts=1 then
    PRH:sts=0
    Access:prheader.update()
    BRW1.ResetSort(1)
    BRW1.UpdateWindow
    End

    But it still not working, do you have any suggestion to solve the problems?

    thx,

    Joe


    I would have used BRW1.resetFromFile
    and check for an error on update

    Like

    IF PRH:sts=0 then
    PRH:sts=1
    ELSE
    PRH:sts=0
    END

    IF Access:prheader.update()
    MESSAGE('Update failed')
    END

    BRW1.ResetFromFile()
    Thiswindow.reset()


    Sean H

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From cedarsystems@gmail.com@21:1/5 to Joe Tan on Mon Oct 29 16:20:17 2018
    On Friday, October 19, 2018 at 4:46:20 PM UTC+1, Joe Tan wrote:
    Hi,
    I need to change a field from a browsebox. So by the button the value will change. For the example I put an OK button beside the update button (Insert,change,delete)
    so from the button will change the value of a field that is selected from browsebox.
    Does anyone can tell me how?

    thx,

    Try updating the queue.

    BRW1.Q.PRH:sts=1
    or maybe BRW1:ResetFromFile

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)