No edit summary |
|||
(15 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
''Menu: Tools | Form Mode...'' | ''Menu: Tools | Maintain Form Mode...'' | ||
==Introduction== | ==Introduction== | ||
Line 8: | Line 8: | ||
==Maintain Form Mode== | ==Maintain Form Mode (eg. Filtered by Agent)== | ||
:1. Click on '''New'''. | :1. Click on '''New'''. | ||
::[[File:Tools-Form Mode-01.jpg |600px]] | ::[[File:Tools-Maintain Form Mode-01.jpg |600px]] | ||
<br /> | <br /> | ||
:2. Enter a '''Code''', eg. IV-LF, IV-SF... | :2. Enter a '''Code''', eg. IV-LF, IV-SF... | ||
::[[File:Tools-Form Mode-02.jpg |600px]] | ::[[File:Tools-Maintain Form Mode-02.jpg |600px]] | ||
<br /> | <br /> | ||
:3. Select the '''Form''' to filter, eg. Invoice. | :3. Select the '''Form''' to filter, eg. Invoice. | ||
::[[File:Tools-Form Mode-03.jpg |600px]] | ::[[File:Tools-Maintain Form Mode-03.jpg |600px]] | ||
<br /> | <br /> | ||
:4. Click on '''Customize Filter'''. Click on '''press the button to add a new condition'''. | :4. Click on '''Customize Filter'''. Click on '''press the button to add a new condition'''. | ||
::[[File:Tools-Form Mode-04.jpg |600px]] | ::[[File:Tools-Maintain Form Mode-04.jpg |600px]] | ||
<br /> | <br /> | ||
:5. Choose a field to filter, eg. Agent '''(SL_IV.AGENT)'''. | :5. Choose a field to filter, eg. Agent '''(SL_IV.AGENT)'''. | ||
::[[File:Tools-Form Mode-05.jpg |600px]] | ::[[File:Tools-Maintain Form Mode-05.jpg |600px]] | ||
<br /> | <br /> | ||
:6. Change the filter operators, eg. equals. | :6. Change the filter operators, eg. equals. | ||
::[[File:Tools-Form Mode-06.jpg |600px]] | ::[[File:Tools-Maintain Form Mode-06.jpg |600px]] | ||
<br /> | <br /> | ||
:7. Enter the '''agent code'''. | :7. Enter the '''agent code'''. | ||
::[[File:Tools-Form Mode-07.jpg |600px]] | ::[[File:Tools-Maintain Form Mode-07.jpg |600px]] | ||
<br /> | <br /> | ||
:8. Filter Text will be display as: '''(SL_IV.AGENT = 'LF')'''. | :8. Filter Text will be display as: '''(SL_IV.AGENT = 'LF')'''. | ||
::[[File:Tools-Form Mode-08.jpg |600px]] | ::[[File:Tools-Maintain Form Mode-08.jpg |600px]] | ||
<br /> | <br /> | ||
:9. Other '''optional''' setting. | :9. Other '''optional''' setting. | ||
::[[File:Tools-Form Mode-09.jpg |600px]] | ::[[File:Tools-Maintain Form Mode-09.jpg |600px]] | ||
::{| class="wikitable" | ::{| class="wikitable" | ||
|- | |- | ||
Line 45: | Line 45: | ||
| Split Browse & Detail Windows || Enable to split the Windows when click on Browse and Detail button. | | Split Browse & Detail Windows || Enable to split the Windows when click on Browse and Detail button. | ||
|- | |- | ||
| Default Windows <br /> | | Default Windows <br /> * Browse<br />* Detail<br /> || style="vertical-align: top;" | To set the default mode. | ||
* Browse<br /> | |||
* Detail || | |||
|} | |} | ||
<br /> | |||
:10. Lets said you have created more than 1 form mode for same form (eg.'''invoice'''). Go to Sales | Invoice, you will get prompt the '''select browse mode''' to choose. See the screenshot below. | |||
::[[File:Tools-Maintain Form Mode-10.jpg |250px]] | |||
<br /> | |||
==How to lock the form mode by Agent== | |||
:1. Go to '''Tools | User Access Right Assignment...''' | |||
:2. Under the '''list of security''', click on '''form mode'''. | |||
:3. Select the user, eg. '''user code: LF''' (Lip Fong). | |||
:4. Tick to allow execute the '''form mode''', eg. tick on '''form mode: IV-LF'''. | |||
:5. Click '''Save'''. See the screenshot below. | |||
::[[File:Tools-Maintain Form Mode-11.jpg |600px]] | |||
<br /> | |||
:6. Login the user as '''LF'''. | |||
:7. Go to Sales | Invoice... | |||
:8. User LF can see the invoices belong to his '''agent code: LF'''. | |||
::[[File:Tools-Maintain Form Mode-12.jpg |700px]] | |||
<br /> | |||
==Other Form Mode/Filter== | |||
* Make sure the script is <span style="color:#0000ff">1 line ONLY</span> | |||
===Today Only for Sales Invoice=== | |||
<pre> | |||
(SL_IV.DOCDATE = CAST('Today' AS DATE)) | |||
</pre> | |||
<div style="float: right;"> [[#top|[top]]]</div> | |||
===Current Month Only for Sales Invoice=== | |||
<pre> | |||
EXTRACT(Month FROM SL_IV.DOCDATE) = EXTRACT(Month FROM CAST('Today' AS DATE)) AND EXTRACT(Year FROM SL_IV.DOCDATE) = EXTRACT(Year FROM CAST('Today' AS DATE)) | |||
</pre> | |||
<div style="float: right;"> [[#top|[top]]]</div> | |||
===Last Month & Current Month for Sales Invoice=== | |||
<pre> | |||
EXTRACT(Month FROM SL_IV.DOCDATE) = (CASE EXTRACT(Month FROM CAST('Today' AS DATE)) WHEN 1 THEN 12 ELSE EXTRACT(Month FROM CAST('Today' AS DATE)) -1 END) AND EXTRACT(Year FROM SL_IV.DOCDATE) = (CASE EXTRACT(Month FROM CAST('Today' AS DATE)) WHEN 1 THEN EXTRACT(Year FROM CAST('Today' AS DATE)) -1 ELSE EXTRACT(Year FROM CAST('Today' AS DATE)) END) OR EXTRACT(Month FROM SL_IV.DOCDATE) = EXTRACT(Month FROM CAST('Today' AS DATE)) AND EXTRACT(Year FROM SL_IV.DOCDATE) = EXTRACT(Year FROM CAST('Today' AS DATE)) | |||
</pre> | |||
<div style="float: right;"> [[#top|[top]]]</div> | |||
==See also== | |||
* [[User Access Right Assignment (Acc)]] |
Latest revision as of 08:06, 3 July 2020
Menu: Tools | Maintain Form Mode...
Introduction
- 1. It helps to filter the data based on the conditions defined.
- 2. It is very useful for those who DO NOT ALLOW certain users to access the documents.
- 3. For example, agent Lip Fong' can view and access the sales invoices belong to his agent code LF ONLY.
Maintain Form Mode (eg. Filtered by Agent)
Options Explanation Allow Multiple Windows To allow duplicate Windows screen by click from the menu list. Force Filter Force filter. Split Browse & Detail Windows Enable to split the Windows when click on Browse and Detail button. Default Windows
* Browse
* DetailTo set the default mode.
- 10. Lets said you have created more than 1 form mode for same form (eg.invoice). Go to Sales | Invoice, you will get prompt the select browse mode to choose. See the screenshot below.
How to lock the form mode by Agent
- 1. Go to Tools | User Access Right Assignment...
- 2. Under the list of security, click on form mode.
- 3. Select the user, eg. user code: LF (Lip Fong).
- 4. Tick to allow execute the form mode, eg. tick on form mode: IV-LF.
- 5. Click Save. See the screenshot below.
- 6. Login the user as LF.
- 7. Go to Sales | Invoice...
- 8. User LF can see the invoices belong to his agent code: LF.
Other Form Mode/Filter
- Make sure the script is 1 line ONLY
Today Only for Sales Invoice
(SL_IV.DOCDATE = CAST('Today' AS DATE))
Current Month Only for Sales Invoice
EXTRACT(Month FROM SL_IV.DOCDATE) = EXTRACT(Month FROM CAST('Today' AS DATE)) AND EXTRACT(Year FROM SL_IV.DOCDATE) = EXTRACT(Year FROM CAST('Today' AS DATE))
Last Month & Current Month for Sales Invoice
EXTRACT(Month FROM SL_IV.DOCDATE) = (CASE EXTRACT(Month FROM CAST('Today' AS DATE)) WHEN 1 THEN 12 ELSE EXTRACT(Month FROM CAST('Today' AS DATE)) -1 END) AND EXTRACT(Year FROM SL_IV.DOCDATE) = (CASE EXTRACT(Month FROM CAST('Today' AS DATE)) WHEN 1 THEN EXTRACT(Year FROM CAST('Today' AS DATE)) -1 ELSE EXTRACT(Year FROM CAST('Today' AS DATE)) END) OR EXTRACT(Month FROM SL_IV.DOCDATE) = EXTRACT(Month FROM CAST('Today' AS DATE)) AND EXTRACT(Year FROM SL_IV.DOCDATE) = EXTRACT(Year FROM CAST('Today' AS DATE))