Jump to content

Value List Based on Field Content Calculation?


Recommended Posts

Posted (edited)

I'm trying to make a value based on the content of JSON_cListKeys in this specific record only:

1335935593_ScreenShot2020-07-03at23_38_47.png.a9019ab797fe066d698751823fe6cbbc.png

The fields involved:

 

527109401_ScreenShot2020-07-03at23_15_36.png.a9cdeb29e7a3e9176cf34788df2268e5.png

 

I get the "This Value List Won't Work... based on a calculation" message. So I tried to see if looking up the content or calculating the content and using that instead.. um.. no, it's still a calculation.

468820579_ScreenShot2020-07-03at23_17_27.png.45be37d7b05820e97890102775fa472f.png431793079_ScreenShot2020-07-03at23_17_48.png.8df207405c63d0aafc90726c8b9729e1.png

 

I Tried changing to a calculated text field ... I get no error from the value list creator, but I still don't get actual values in the list.

1005588280_ScreenShot2020-07-03at23_21_01.png.3c09b546e91c9dffea8a22df99a140df.png

In order to only get the values from the current record, I created a self join [Items <--> Items_Current_Record] and linked it to itself by the unique ID, and I also tried the JSON_cListValues field for the pair as well. (At the bottom of the screenshot)

 

199360472_ScreenShot2020-07-03at23_16_09.png.dd8222650303570e076528533d7d8893.png

 

I've found a similar thread but the data it's working with is numbers and increments. It's building that list by multiplication of intervals.

I have a feeling I need to either do something to actually get the $result of the calculation to be text.
The self join, if I understand it right, should limit my results to just that one record at least.

 

Sandbox.fmp12

 

 

Sandbox.fmp12.zip Sandbox.fmp12

Edited by Tony Diaz
Link to post
Share on other sites

Your basic premise is flawed. The error message you see does NOT say anything about calculation. It says that the field cannot be indexed. It cannot be indexed, because the calculation is unstored.

If you want your value list to show values from the current record only, then define it to use values from the Items_CurrentRecord::JSON_cListKeys0 field, show only related values starting from Items. And you can get rid of the JSON_cListKeys_Values0 field, it serves no purpose that I can see.

 

Link to post
Share on other sites

Hmmm...  that JSON_cListKeys_Values0 field was because for whatever reason, I kept getting that same error message when I was trying to define the value list, so I thought maybe that it was trying to parse the formula calculation text itself, and not the result.

 

I had the right thought then, at least. The values on the self join table only and the field content is the calculation result. I must have been selecting something wrong in the beginning, before I added that .._Values0 field. 'cause, yes, it's doing nothing.

It's working now. Whatever?!?! I swear this is what I was doing before and getting that error.

...at least that was what I was thinking needed to be done, obviously I must have been picking something else.
Ugh.

621159854_ScreenShot2020-07-04at03_16_59.png.98c915371c65de3d120809368554b99b.png

1479723981_ScreenShot2020-07-04at03_16_15.png.c0c7077b1f68d12d8993f2184dd86177.png

Thanks :)

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

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