Where Does the System Get Related Number Count?

With the Concatenate expression, I have been able to populate the field of Account for a Location. The structure is one Bill To to many locations. So, I have put together the Bill To Account number with an added number. If the Bill To is 1001, I have concatenated the new location with 1001-01. I have done this manually just to test. (The Location field is not the table key) If I were able to extract the system count, I would be able to concatenate with the Bill To creating a sequence. Is there a way to extract that count?
3X_b_5_b5f1257b4a42498c57bf735b2c8031ce02ffcbb6.png

Solved Solved
0 8 260
  • UX
1 ACCEPTED SOLUTION

It took some thinking but I did figure it out. Maybe it will help others this solution. (I feel proud of myself LOL)

View solution in original post

8 REPLIES 8

If you are referring to the count of related records in the child table, those can be obtained from REV_REF column in the parent table. In the case shared by you, there will be a reverse reference LIST() type virtual column titled [Related Locations] that holds a list of key numbers of child table.

You could get the count by the expression COUNT([Related Locations]). However using this sequential serial number system is not a recommended practice in AppSheet, unless the app is a single-user app or the app will never be used simultaneously by more than one user for operations involving serial number logic. Please take a look at the following informative post by @Steve

Thanks for the reply. I think I did what you suggested. This is what I did:
3X_3_b_3b914a7401ba471dcb7a50526973d4c3c3fad389.png

The result in getting is all the child records are being added a 1. That would be find for the first one, not the subsequent ones. Any suggestions?
3X_1_5_152bbd6d83ef227124996574412f3cae1d7af355.png

Hi
Could you update, where are you using this expression? Is this [Location] column in parent or child table?
Which is Parent Table and which is child table?

From the information shared so far, it sounds that your expression for that count part could be
COUNT([Bill-To].[Related Locations])

Thanks for the quick reply.
Location is the child to the Table Bill To.


And this is from the Bill To Parent Table

Okay, thank you. Then is the suggested expression working?

I did try it. It did not work.
3X_b_1_b19b1da3697cf6dbef817d33daacdd2ab03bc566.png
I also tried the MAX expression, but gave an error.

It took some thinking but I did figure it out. Maybe it will help others this solution. (I feel proud of myself LOL)

Top Labels in this Space