Carrying over inputted Value thru Records

For HanDBase related topics that are not specific to one platform.

Carrying over inputted Value thru Records

Postby Treanot » Fri Mar 24, 2017 3:31 pm

Not sure, if I stated that correctly, I'm also trying to simplify the issue.
Is it possible to carry a value from prior records, not just the previous one, thru several records

Problem:
I have a basic inventory program, that keeps a inventory control number (old value +1) = ID number. Each object gets an individual ID number, thus its own record. Each object gets a name field.

There are often more than one of the same item, so on the record there is 2 additional fields; number of, of number (ex 1 of 10).

Entries are typically entered in complete groups, and sorted ahead of time

Example, 5 Soda cans. 3 are PEPSI, 2 are COKE. The 1st entry is ID 1, PEPSI, 1 of 3. The 2nd entry is ID 2, PEPSI, 2 of 3. The Third entry is ID 3,PEPSI, 3 of 3. The 4th entry is ID 4, COKE, 1 of 2 and lastly the 5th Entry is ID 5, COKE, 2 of 2.

This example is one a small size, imagine this large amounts 10, 20, 30

What I would like
I would like to have a field that grabs the ID value based on "# of" value =1 and carry that to the next record - Field SERIES. Example -
ID: 1
NAME: PEPSI
# of : 1
of #: 3
SERIES: ID 1

ID: 2
NAME: PEPSI
# of :2
of # :3
SERIES: ID 1

ID: 3
NAME: PEPSI
# of :3
of # :3
SERIES: ID 1

ID: 4
NAME: COKE
# of : 1
of #: 2
SERIES: ID 4

ID: 5
NAME: COKE
# of : 2
of #: 2
SERIES: ID 5

This seems much more complicated than just using previous value of ID. I'm struggling with this. Yes, pretty sure you could just type in the Series number, and use the SERIES field as a previous Record but what fun is that. Trying to use some automation- but failing

Maybe a calculated field with ID # + 0, then another hold with a previous field to grab that, or an if ID >2 then previous ID (but that will also increase the ID value), somehow to loop a value, then use a conditional. SUM Value in calculated field adding 0 (not bad idea). Am I missing something simple. Struggling - Suggestions?

Thanks
Treanot
 
Posts: 39
Joined: Mon Feb 08, 2010 3:15 pm

Re: Carrying over inputted Value thru Records

Postby Treanot » Mon Mar 27, 2017 9:58 am

Working out Bugs but this seems to be working. Currently on screen it gives the Wrong value of the # of = 1 value until saved, but I can work on that later.

Hold id (Conditional)
If # OF is Equal to 1
Result CURRENT ID
Else SERIES MATCH

Current ID (Calculated)
ID+0

Series Match (Integer)
Default Value Use Previous Record's Value HOLD ID

Real Match
if # of is equal to 1
result = Current ID
Else Series Match
Treanot
 
Posts: 39
Joined: Mon Feb 08, 2010 3:15 pm


Return to HanDBase General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron