Jump to content
Sign in to follow this  
Nestor

Send number field to a different field based on a value list

Recommended Posts

I have a number field (dollar amount), and what im trying to do is based on the dept-value list i want the sum of all a.m.'s to go ontop. so if i have 2 a.m.'s. 1 with 100$, and the other one with 300$. i want my summary to say 400$. and the same thing with the other one.

here is an example.

the problem for me right now is trying to find a function to get the number and add them together if the value list is the same.

Thanks

Test.zip

Share this post


Link to post
Share on other sites

Why are we exposed to repeating fields here?

That is a good question. And I would ask: why are we exposed to hard-coding of values, and as a result, a multitude of fields and relationships - where a proper relational model would provide the simplest solution?

Relational.fp7.zip

Share this post


Link to post
Share on other sites

why are we exposed to hard-coding of values, and as a result, a multitude of fields and relationships - where a proper relational model would provide the simplest solution?

Because I've learned that metaphoric idiosyncrasies prevail, I would never ever do things the way I just demonstated ... I have here simply used the approach Filmaker Inc. have used in their Event management template ... which apparently appeal to the way the marketing geniuses FMInc have hired thinks, It's the way they wish to bridge spreadsheets to RDBMS in the niche present occupied.

I'm pretty sure Goupil isn't daft, but is his staff??

I would probably use Eric Sheid's new CF:

/* 

related_summary ( field_ID ; field_compare ; id ; n )

accumulate a list of field_ID values for unique values of field_compare

field_compare relationship needs to sorted by field_compare

id parameter should start with non-value, n parameter should start with 1

*/



Case(

id <> GetNthRecord(field_compare ; n); 

GetNthRecord(field_ID; n ) & "¶"

)

& Case(

IsValid(GetNthRecord(field_compare; n+1)); 

related_summary(field_ID; field_compare; GetNthRecord(field_compare; n); n+1)

)

Which more or less is doing the same as "Ugo's Method" with a two criteria selfjoin only.... If the issue REALLY is to make the display behave exactly as the questioner wished it to. I've joined this thread with a provocation, to guide the attention to these threads:

http://fmforums.com/forum/showtopic.php?tid/189946/post/266469/hl//fromsearch/1/#266469

http://fmforums.com/forum/showpost.php?post/266573/

--sd

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.