I am making an app to record rent payments. I have a payments table that records the tenant who paid, the month that the rent is supposed to apply to, the amount due, the amount paid, etc. I have an enumlist for the months with every month of the year in it. Since some tenants pay a month or two in advance, when recording rent, I don't want the months that they have already paid for to show up in the enumlist so I am not recording it twice.
I have some virtual columns that collect all of the months that have been paid and am trying to set up the initial values with an equation that looks something like:
[Months in Contract]-[Paid Months]
The problem I am having is that it will either show all of the months from the enumlist I created and have certain months that just aren't selected, or it shows all of the months plus one more entry with a couple of months bunched together (May,June,July).
How can I make it so that it will only show me options for months that haven't been paid yet? And better yet, to have the initial value be the next month that needs to be paid so I don't even need to go and select it?
I have been dealing with my own EnumList issues and just discovered today that there is an issue, at least with one column in my app, where the EnumList values are NOT being written with the proper spacing. AppSheet writes out LIST's in a column such that there is a space BEFORE and a space AFTER each comma. Check that your column values have this proper spacing. If so then there should not be any problem with using "[Months in Contract] - [Paid Months]" provided both are defined as EnumList.
If you are having spacing issue and cannot seem to get the columns to write out correctly (which is the problem I am having), you can still perform the expression but will need to force the column value into a LIST. something like this:
SPLIT([Months in Contract], ",") - SPLIT([Paid Months],",")
I hope this helps!
I will take a look at this, but I have one follow-up question. Should I have a list of values (all of the months of the year) already in the enumlist I am trying to do this to or should I just delete them all? And would I put my equation in the initial value section or somewhere else?
Thanks for the help.
User | Count |
---|---|
33 | |
11 | |
3 | |
2 | |
2 |