Affichage vue Dynamique / Problème AJOUT

Bonjour à tous,

Étant un Amateur d’Excel dynamique, je viens de découvrir Appsheet il y à moins de deux semaines, et je me régale un petit peu ! C’est très sympa, et je remercie d’avance les différentes personnes pour leurs différents tutoriel ou astuce sympathique, j’en apprend tout les jours. Ont s’y perd vite avec les formules !

Je rencontre quelques petits soucis, ou du moins, je souhaiterais un petit peu d’aide. Peut-être que ma solution de base que je souhaite mettre en place mérite d’être vue autrement !

Je viens de découvrir seulement depuis 2 jours les dashboard Dynamique

Concept général:

  • Une page nommée “Crypto Buisness”, celle-ci étant une sorte de “porte-feuille”. C’est une tranche d’une table CoinListGeneral pour conditions USEREMAIL.
  • Chaque personne peut intégré une ligne dont une colonne “nom” est définis par: L’utilisateur lui même ou en Suggestion des valeurs d’une autre table (Présales) qui remplis les données automatiquement.
  • Cette colonne “Nom” ne peut exister qu’une fois par utilisateur.
  • Une table enfant “ListCoin” est regroupée à la table parent. Celle-ci permet de rentrer les différents achats/ventes effectuée. La table CoinListGeneral ferra le calcul total de ces petits.

(Jusqu’à la tout va bien, tout fonctionne).

Mon problème:

Ma table CoinList nommée “Historique en photo” me pose problème. De base, en arrivant sur cette vue, j’ai l’ensemble de ma page historique qui s’affiche (Bon Ok, finalement, c’est pas plus mal, celà permet d’avoir un aperçu global puis en cliquant sur une ligne, j’ai uniquement les lignes référencées qui s’affiche, celà me plaît bien). Le problème est dans l’AJOUT du coup. Si je clique sur une ligne, l’ajout se ferra correctement, car si je reprend le descriptif de REF_ROWS :

une ligne ajoutée à partir de la vue en ligne de la liste résultante sera automatiquement renseignée avec une référence à la ligne de l’ REF_ROWS() expression

Du coup, j’aurais souhaité soit:

  • Ne pas afficher le bouton Ajouter sur ma table tant qu’une ligne n’ai pas sélectionné (Malheureusement, les conditions d’intrusction d’une action ne sont pas Dynamique si j’ai bien compris d’après mes divers essais)
  • La possibilité de faire un rajout sans qu’une ligne soit sélectionné dans la REF (A priori, pas possible)

Actuellement c’est l’affichage de CoinList_Inline. Mais j’ai effectuée des tests sur une Slice.

Avez-vous d’éventuel suggestion à me proposer ? En passant par une slice ? Mais comment récupérer une valeur de colonne de la ligne sélectionné (Le nom par exemple) ? Je n’y arrive pas.

QUESTIONS SUPPLEMENTAIRES POUR INFO

  • Est-il plus gourmand de faire un select ou une autre enfant/parent en terme de sync ?
  • Que représente 20 / 25 colonnes dans une table, c’est vraiment beaucoup ou cela est correct en terme de ressource ? (Je n’ai aucun recul sur les App en route)

En vous remerciant d’avance, toute aide ou proposition est le bienvenue

Solved Solved
0 6 839
  • UX
1 ACCEPTED SOLUTION

Hi @legoyo57

Suggestion 1:
What if you make an action “add a children”, attached to your parent table, in order to add a new children ?
and you set “attach inline” for displaying option.

Suggestion 2:
You can, similarly, attach an action “make a brother”, that will be attached to your children table.
This one may be easier, using this:
Here is an example of “make a brother”
3X_b_f_bfc425255cf7d7ddf3cac869989612fd3a4ed0e0.png
3X_7_3_73b044b58547b68087c48676e341f18ed159efab.png

Simplified expression below:

LINKTOFORM("Tasks_Form", 
  "Key", UNIQUEID(), 
  "Parent", [_THISROW].[Parent],
  "Description",[_THISROW].[Description]
)

Please note:
Blank_VC is a virtual column with app expression "", which purpose is to display inline actions only.

View solution in original post

6 REPLIES 6

Aurelien
Google Developer Expert
Google Developer Expert

Hello

il vaut mieux écrire en anglais si tu veux une réponse rapide, très peu de francophones ici

on a dynamic dashboard, it’s not possible to hide or display a button depending on if an item have been selected first.
You may want to use a filter dashboard instead of a dynamic dashboard for your specific case.
Here is a sample app to understand how it works:
https://www.appsheet.com/templates/Allow-the-user-to-filter-a-view-based-on-a-form?appGuidString=912...

About your additional questions:

clearly more efficient to use dereference expressions.

I would say it almost doesn’t matter.
The most important, performance speaking, is about virtual columns and complexity of your calculations.
I have apps with 40 real columns, 40 virtual columns or so, many parent-children related table…I don’t get a significant slowness. Maybe my expressions are too easy to calculate

In addition, about performance, some ressources:

Bonjour, et merci d’avoir pris le temps de répondre. Aillant le traducteur intégré au naviguateur, je n’ai pas pensé concernant la langue. J’écrirais an anglais pour les prochaines fois.

Alors, j’avais déjà regarder un petit peu cette exemple, malheureusement, cela ne fonctionne pas, ou du moins, je n’arrive pas à le mettre en place.

Si j’inclus dans ma formule de tranche :

ANY(CoinListGeneral[Id]) = [ParentId]

ANY(CoinListGeneral[Id]) qui correspond à ma table parent.
[ParentId] qui correspond à ma ligne en cours.

Puis après contrôle, ANY(CoinListGeneral[Id]) vaux toujours la même valeur (Id de la première ligne de ma tab) car ANY fais un choix au hasard ??

(Une valeur choisie au hasard dans cette liste ( …CoinListGeneral[Id])) est égale à (La valeur de la colonne ‘ParentId’)

Je n’arrive pas à faire un affichage des lignes de ma Tab CoinList selon l’Id de la ligne sélectionnée sur CoinListGeneral. Soit tout s’affiche, soit rien.

Une idée de la formule à intégré ? J’ai peut-être des problèmes au niveau des paramètres Key / Label ?

Merci pour votre retour d’expérience et les réponses précises

Hi @legoyo57

ANY pick a random item in a list, indeed.

I’m not sure of your table structure, so I will use generic words for educationnal purpose.

You need to set a value on your filter table, let’s name it “filterTable”.
And this filterTable must have a UX View, which will be a part of the dashboard view.

So, assuming [parentIDToFilter] is the name of your column in your filterTable, with type Ref (source table: parentTable), then your row condition will be:
For childrenTable slice:

[parentId]=ANY(filterTable[parentIDToFilter])

or, equivalent:

IN([parentId],filterTable[parentIDToFilter])

and, you will need a childrenTable UX to display filtered items (more exactly, slice table), and this one will be a part of your dashboard.

Let us know if it’s clearer now.

Hello @Aurelien

My problem is not in the display because it works with the table of REF_ROWS Or Table_Inline automatically create. I actually took your approach and I always come to the same problem:

  • My parent table has a column “EnfantId”

  • If I select a row from my parent table, my child table’s [ParentId] column value refers to my parent table, that’s okay.

  • If I don’t select any row in my parent table, I can add to my child table but my [ParentId] column is zero, 0, so this one won’t belong to any filter.

Regarding the display, it’s good:

  • If no row selected on the parent table, I have the entire child table.

  • If a row is selected on the parent table, I have the rows from the child table for [ParentId] = to the selected row. It’s good.

The problem is in adding, that if no row is selected I end up with a [ParentId] = nothing.

I have for Ref from the child table to the parent table: [ParentId]

My addition to the child table is done with an Enum pre-filled in the “Name” if a row is selected, via [ParentId]. [Name]

I then tried with a Select Id via the name for the “ParentId” box, which would work fine if I didn’t get a circular error.

Because it is necessary that:

  • When no line selected, I have the choice of the name.
    (I performed a Valid_If of the name column of the parent table which works fine, but [ParentId] is 0. Knowing that the Enum list can be determined because it grows with each row added to the parent table )

  • If list selected, this is pre-filled (I have set up a [ParentId]. [Id] for the ref column and [ParentId]. [Name], which works perfectly)


Either this is not possible, or you have an idea to get around it from a different point of view.

Sorry for my English

Thank you anyway !

Hi @legoyo57

Suggestion 1:
What if you make an action “add a children”, attached to your parent table, in order to add a new children ?
and you set “attach inline” for displaying option.

Suggestion 2:
You can, similarly, attach an action “make a brother”, that will be attached to your children table.
This one may be easier, using this:
Here is an example of “make a brother”
3X_b_f_bfc425255cf7d7ddf3cac869989612fd3a4ed0e0.png
3X_7_3_73b044b58547b68087c48676e341f18ed159efab.png

Simplified expression below:

LINKTOFORM("Tasks_Form", 
  "Key", UNIQUEID(), 
  "Parent", [_THISROW].[Parent],
  "Description",[_THISROW].[Description]
)

Please note:
Blank_VC is a virtual column with app expression "", which purpose is to display inline actions only.

Hi @Aurelien,

Indeed, it is much simpler and logical in the end. I was fixed on my historic Slice for add a rows, but which ergonomically was not correct.

I choice the solution 2, with an action and your formula on my rows of the parent table.

Thanking you for your time and patience!

Thanks again

Top Labels in this Space