Dynamics SL Field Length limit / Invoice Number length - microsoft-dynamics

If anyone can point me to the documentation for SL, which address the field length limits, right now i need to know about the length limit of invoice number.

I'm not quite sure where the documentation is, but the way I figure out the field length limits is with SQL Server Management Studio (SSMS). You can look at the databases and various tables/fields and figure out how big each field is as well as myriad of other information.
To find out the invoice number field length with SSMS I would connect to the Dynamics SL Company database (not the system database). The invoice number is a part of the accounts payable (AP) screens, so I would expand the APDOC table. Once you've done that you will see a few folders, one of which is the Columns folder. Expand the Columns folder and you will be presented with a list of fields. Within the parenthesis next to each of those fields you will find the length. In your case you will want to look at the InvcNbr field which is 15 characters for me, which I believe is the out of the box length.
An alternative method is to use customize mode within Dynamics SL. If you open up any screen that has the invoice number field, like Voucher and Adjustment Entry you can open up customize mode using the menu at the top of the screen. Next, open up the Property Window either by using the customize menu or hitting F4. Next, select the field you want to know the length for. For all character fields there will be a property called Mask that will be filled with several Xs. To figure out the field length, you simply need to count the number of Xs.
These 2 methods should be fairly future proof and will allow you to not have to search for the documentation for whatever version of Dynamics SL you might be on.

Related

Add range and ><= operators to django form

I am building enterprise software which someone can use to input order data from a customer. Sometimes customers order something with length 1000+ or will order something within a range of 400-600 for example.
How can I display these options in a dynamic form which inputs an integer into a model? Will my model have to have max_length min_length, max_width, min_width etc or is there a better way?
I've considered creating non-required fields and dynamically displaying the form depending on a dropdown menu choice near every dimension with (greater than, equal to, less than). This will make me create around 6 new fields for a basic l/w/h input.
For example: If someone wants a range they can click on the side dropdown near the dimension and select range, which will then show a new input box which submits data to max_DIMENSION. Or when a user chooses > then the database saves that field as greater than.
I expect to be input a range with 2 values, or a >/=/< with a single value.

Searching a large data file for a credit card type and its relevant info

So I am running Python 3.7.1 and I am trying to make a program that pulls out only customers that use an American Express card and display only their name and Email.
I have part of the code that pulls all the customers data that uses the same card type, but it pulls up multiple of the same name and email and all other information. I just can't figure out how to eliminate multiples and only display Name and Email. Below I will show a picture of my code and a screen shot of the output for reference.
My code so far
Output(notice the multiples of Mary and Hunter)
Assuming your file isn't extremely long, consider using Python's set data structure to filter out duplicates. You can check for membership within the set via the in operator (e.g. x in s) and you can add new elements to the set via the add() method (e.g. s.add(x)). At a high level, you want to amend your code to check whether the element is already in your set (in which case you don't need to print it again), and if it is not in the set, add it to ensure you don't print it again.

Modify Dynamic Field Display Length in OTRS

I've added a dropdown field to a customer's ticket in OTRS called Branch. It allows users to select their branch, identified by a number and a name. For example, my branch is 901 - Support Group. When I display this field in the ticket zoom view on the Agent side, it gets truncated to 901 - Support[...]. I can see the entire value of the field as a hover text when I hold my mouse over it, but I was hoping there would be a setting to expand the length of the field or to tell OTRS to display it as multiline text. Is there a configuration option in OTRS to change the display length, or does anyone know where I would need to modify the code to change the length myself?
With some help from crythias over at the OtterHub forums, I was able to find the right setting.
Navigate to the SysConfig
Filter by the Ticket config group (dropdown on left)
Locate and select Frontend::Agent
Locate Ticket::Frontend::DynamicFieldsZoomMaxSizeSidebar
By default this is set to 18 characters. I reset it to 140 (Twitter rules), and it automatically wrapped the text for me.

Making a Row Read Only in a tabular form based on table value

I have a tabular form which is updated throughout the year and i wanted to prevent users from editing certain rows. Currently the 'row type' is hard coded however I want the application admin to control which 'row types' are readable / write at certain times. My answered question, click here.
Currently a dynamic action is fired which prevents the rows that contain the type 'manager figure' and 'sales_target' being edited.
I have created a table with the three row types against each customer. Each status is set by a number: 0 to 3 (These i will decode into something meaningful for users).
0 - Row with that row type is read only.
1 - Users can enter into the row with that row type.
2 - row is read only with that row type.
3 - row is complete and set to read only.
I have created a new form (new tab) for the admin user to maintain each status.
Currently for Customer 'Big Toy Store' rows should be set as follows:
Manager Figure row should be read only (since set to 2)
Sales should be readable (since set to 0)
Sales target should be writable (since set to 1)
Please can i be pointed in the right direction, ive looked into jquery but struggling to work out how to pass the output of an sql query to it, so it can be used to determine which rows should be read only.
Link:apex.oracle.com
workspace: apps2
user: developer.user
password: DynamicAction
application name: Application 71656 Read only Rows for Tabular Form
I'm not sure that a tabular form is a good format to work out this idea. As you can see, you require quite a bit of javascript to produce the results you want. Not only that, but this is all client side too, and thus there are some security risks to take into account. After all, I could just run some Firebug and disable or revert all things you did, and even change the numbers. Especially with sales figures, which is something you most definitely do want altered by everybody and is also the nature of your question, security is important.
There are more elegant ways here for you to control this, and not in the least to reduce the amount of highly customized javascript code. For example, you could do away with the tabular form, and instead implement a modal popup from an interactive report. Since the modal popup would be an iframe and thus a different page, you can create a form page. On a form page you have a lot more control over what happens to certain elements. You can specify conditions, read-only conditions, or use authorization schemes. All things you can not evidently use in a tabular form.
I'd think you'd do yourself a service by thinking this over again, and explore a different option. How much of a dealbreaker is using a tabular form actually?
You need the user. You need to know what group he belongs to, and then this has to be checked against the different statusses and rows have to be en/disabled. Do you really want this to happen on the client side?
I'm not saying it can't be done in a tabular form and javascript. It can, I'm just really doubting this is the correct approach!

Designing MySQL table for Achievements system

I am creating a database for an achievement system (like something you would see in a Blizzard game). I would like to have a GUI that displays the current progress of all achievements in the game which means I will need to query the progress of all achievements for a user in order to populate the GUI. I plan on having somewhere around 100 achievements.
This brings about a design question. What is the best way to design the database and querying code to query the progress of ~100 bit fields?
It seems like the brute force method would be to get the entire row of achievements and then for each field in the row do some hardcoded string comparison to determine which achievement we are dealing with.
Another possible solution may be to have a big switch statement based on the column index of the table and handle each achievement for each case (requires not modifying the table or you have to refactor a lot of C++ code).
I'm curious to hear any other designs you guys may have for this.
Thanks!
I suggest building a solution using 3 tables. These tables are users, achievements and user_achievements. A user would be identified with a u_id in the users table. An achievement would be identified with a a_id in the achievements table. You would then keep track of users achievements by inserting a row in the user_achievements table that includes a u_id to identify the user and a a_id to identify the achievement. The user_achievements table would also contain a column that would specify the % completion of that achievement for the given user.
Came across this question and even though it's 5 years old, perhaps someone would be interested in following approach.
Achievements are usually broken down to numbers (the rest, like Name, Description of each achievement can be put to site/app core to avoid bloating the DB).
lets be simple, we are not FB and don't need separate table for them, so in "users" table we add just 1 single column: "Achievements" it is a varchar(50). Number in brackets (50) will depend on your actual needs to this column (i.e. how much data it stores).
so you end up having in each cell of the Achievements column a numerical sequence: 10982039482084109384
Read this line of digits as follows, from left to right: user has reached "1098 profile views", received "2039 likes", etc. Optionally, add a separator for easier distinction + to instantly handle cases when as first user had 25 likes, then 125, then 2039 (2 digits, 3 digits, 4 digits - or another alternative is to use 0025 then 0125 then 2039 given you know max digits is 4 per achievement). But still lets say we decide to use separators, i.e. a comma:
1098,2039,4820,8410,9384
Then once you need a data, just SELECT achievements belonging to specific userID and subsequently (if you added a separator)
explode (',', $array)
then your site php core knows that first 4 digits stand for "profile views" and lets say this means that he has a level 10 badge for profile views (1 badge for 100 views).
Thereon, you can easily do operations with no further need for SQL queries. Example, user wants to know his progress on achieving a level 20 badge, you display: he has a 1098/2000 (or 55%) progress.
At that, achievement Description, Name, level information is stored in site core, while percentage is calculated on the go.
Hope the logic is clear and may be useful to any1 in community out there.
Cheers!