Turning Ranked Numbers Into Word Tags

Yes, this should work fine.

Ok thx for the confirmation

Here are some procedures you can use to collect budgetted and spent amounts in TinyDB, and a procedure to export them as a table, filtered by date range and category, if desired.

monthly_budget.aia (4.1 KB)

The procedures are draggable.

The table is suitable for use with any of the sorting techniques in

2 Likes

Thx a lot! Will take a look at the procedures to understand them and use them in my project!

The procedures all seem pretty straightforward, but may I know what purpose this procedure serves? It doesn't relate to any of the other blocks/procedures. It seems to get a value and checks if it is less than 10 and then joins it with a 0 if I'm reading this correctly... how does this help exactly? Thanks for being so patient @ABG

I added the NN value procedure in case you needed to build a yyyyMM key from a year and month number.

The year will be always 4 digits (unless you own a time machine), but the month number will be in form MM only a quarter of the time (assuming you use your app all year long) so you would want to code

yyyyMM = JOIN(yyyy, NN(month_number))

if you got your month_number from (for example) a List Picker .SelectionIndex or a Date Picker.

This routine also comes in handy in formatting displays for stopwatches and clock apps.

1 Like

Oh k thanks :smiley:

I've attempted inserting these blocks you have provided for me into my project for a while now @ABG. However, I'm now a little stuck on taking the taglist and loading it in for the user to see. This is what I used to do to store and load textboxes:


But now I used parameterized procedures but it still doesn't look quite right. Could you please correct me if I'm wrong and show me a more block efficient to do this?

Export your .aia file and upload it here.
export_and_upload_aia

1 Like

oh ok here:
TheFinanceBudgeter.aia (3.5 MB) @ABG

When your blocks look like combs, you have missed an opportunity to
code a loop over items in a list.

The recently enhanced ListView lets you mix images and text.

Learn how to load Elements from lists.

P.S. Further thoughts over the weekend ...

  • Your numeric image file names for your predefined budget categories are referenced by the Designer Image components but not organized to match them up with category names. If you ever want to make your categories more flexible, you would rename each category image file to category.png to save yourself from having to do a lookup at run time. Just add .png at the end to get the image file name.
  • Your screen handling is wrong. You open Screen1 without closing the current screen. Search for FAQ Screens for details.
  • Your details screen lacks a List Picker loaded with years 2020, 2021, 2022, 2023,... Put it to the left of the Month Picker, to give you yyyy.
  • List Pickers suffer from fewer complications than Spinners, and have benefits like SelectionIndex, so you can get a 2 back for February and run it through NN() to get 02 for your yyyyMM keys.
  • Different people have different budget category requirements. For example, I have no pets, but my family has different old cars whose maintenance costs need to tracked against their replacement costs. Let them add their own categories, and choose which image files they want associated with them.
  • Some day you might want to Internationalize your app. Clear those category names off the image files and just show them like icons next to the user chosen associated category names. If you use the Clock component to generate your month names and to map them back and forth to month numbers, that's one less translation problem to worry about.
  • There is plenty room for reuse of components in your app. You don't need a text box for every possible input, if you choose your category first from a ListView or List Picker and take your input from the same Textbox and Enter button that will take the selected category and file that text box's input appropriately.

You put a lot of redundant detail into your app, and I have much less appetite for drudgery than you, so I will leave cleanup up to you.

1 Like

Ok thanks for the detailed information

Hi again, I just want to ask a quick question. When I want to change the value back to its original categories, I get each of the categories' or values' respective tag and then remove the parts of the tag that I do not want right? Hope you can understand what I'm trying to say! :grimacing: @ABG

That could work for you if you are using tags built up from different parts by JOIN, like I do in my sample code at Turning Ranked Numbers Into Word Tags - #43 by ABG

Ok thx will do that

Hi again, I'm a little confused about the overspending_table procedure, what does information does the three variables at the top of the procedure require? I'm also unsure of when I should be using this procedure since it creates an entire table from this procedure. @ABG

Additionally, when I inputted this code into my code, the saving mechanic for this app just stopped functioning. @ABG
Below is some of my code for saving, I know that you want me to clean it up but I currently don't have that amount of time at this moment of time:


@ABG pls respond ASAP, it is really important for me to finish this app after coming so far. Thx! :slight_smile: