Announcements
The Google Cloud Community will be in read-only from July 16 - July 22 as we migrate to a new platform; refer to this community post for more details.

Dropdown not showing correct options -

My data model for a marking app is this. It's so tutors can create a bank of Criterias in a Rubric. Each Criteria has a Marks Band particular to that Rubric. Essentially this...

Marking App_2024-06-20T10_14_15.258Z.png

When I view a Rubric I display it's related Marksbands with a  REF_ROWS("Marks Bands", "Rubric") like this (and it gets the relevant Marks Bands)

Cursor_and_MarkingApp2024_-_AppSheet.png

But when I edit a Criteria , which is in the data model like this...

MarkingApp2024_-_AppSheet.png

When I edit a Criteria I get ...

Form.png

So the Edit contentsd seems to behaving differently from the View contents.

I tried adding a slice to Rubrics like this...

[Rubric] = [_THISROW].[Rubric]

... and then using that in Marks Band View... 

I tried adding a mixture of any of these all over the place...


FILTER("Marks Bands of this Rubric", ([Rubric] = [_THISROW].[Rubric]))

SELECT(Marks Bands[Rubric], [_THISROW].[Rubric] = [Rubric])

FILTER(
"Marks Bands",
AND(
([Id] = [_THISROW].[Rubric]),

)
)

ANY(
SELECT(
Marks Bands[Rubric],
([Id] = ([_THISROW].[Rubric]))
)
)

[Rubric] = [_THISROW].[Rubric]

[Rubric].[Section].[Rubric]= [_THISROW].[Rubric]

... such as the System Generated Criteria_Form .... for Marks Bands col within that.... I tried a variety of VALID_IF bits (but it seems that those are for AFTER one has selected a value, not the list from which one selects, right?)

And I can't get the drop down to offer only Marks Bands items that have the same Rubric as the Criteria that is being edited.

Any help understanding what goes where gratefully received.

Tom

 

 

 

 

Solved Solved
0 2 341
1 ACCEPTED SOLUTION

Thank you @WillowMobileSys ... that's fixed it.  Brilliant...

Fixed.png

I think I'm struggling with the expression language, and how similar it is/different from sql, spreadsheet formulas/code.  For example, to me, it'd seem "logical" for REF_ROWS() to have extra params for ordering and maybe limits etc. 

It'd be handy to have a simple data collection that contained related tables, many-to-many, actions etc and show how they would be connected in sql, and then how that maps onto AppSheet expressions. For example, ORDERBY comes first not last ๐Ÿ™‚ 

Another thing that is challenging AppSheet wise is that functional stuff can be all over the place. The logical place for this (to me) was to create a Data Slice, then connect that to the VIew (I couldn't get that to work), I thought it could be an INITIAL_VALUE but instead the solution was a VALID_IF.

I found this tutorial REALLY useful because it has a simple sheet to start from (with a bit of data in) and instructions written down that I can follow ("Now do this etc") - which is how I learned Apps Script. If anyone has similar resources like that I can work through I'd appreciate them (more than video tutorials, which often spend 4 mins introducing the topic, and the guests webinar style )

Anyway... fabulous stuff, thanks again.

Tom

 

 

View solution in original post

2 REPLIES 2
Top Labels in this Space