Author Topic: shapedata and conditional label  (Read 3344 times)

0 Members and 1 Guest are viewing this topic.

shinji7800

  • Jr. Member
  • **
  • Posts: 27
shapedata and conditional label
« on: February 24, 2021, 07:27:37 AM »
Hi everyone,

I am trying to set a simple formula for a conditional label for a shapedata.

Code
=IF(STRSAME(sheet.65!Prop.DR, "NRS"), "Interface Fa x/0/y : ", "interface Gi 1/x : ")

Label became dynamic,  but value (set by user) is not updated ... there is no dependencies and precedents so I have no clue what's going on.

please find here an exemple on video : https://youtu.be/wiYMynCw2u0

if you prefer I can provide a google drive link

thanks

best regards
« Last Edit: February 24, 2021, 07:47:56 AM by shinji7800 »

Surrogate

  • Hero Member
  • *****
  • Posts: 1227
    • ShapeSheet™ Knowledge Base
Re: shapedata and conditional label
« Reply #1 on: February 24, 2021, 08:18:10 AM »
At my side it works ! But when i use used-defined data which stored in TheDoc, sometimes i have problems with update text values…


shinji7800

  • Jr. Member
  • **
  • Posts: 27
Re: shapedata and conditional label
« Reply #2 on: February 24, 2021, 08:43:57 AM »
Hi Surrogate !

thanks for your time !

but I not sure if I explain well my issue ...

I use shapesheet with formula (IF statement) for conditional lable in shapedata.


your gif example seems to me, a "simple" field

am I wrong ?

Surrogate

  • Hero Member
  • *****
  • Posts: 1227
    • ShapeSheet™ Knowledge Base
Re: shapedata and conditional label
« Reply #3 on: February 24, 2021, 10:42:59 AM »
your gif example seems to me, a "simple" field
no, that shape contain 2 fields. In this gif you can see how changed only one of them.
Also i can changed "second field", which contain date. It is conditional !
My solution enought complex, it is reason why sometimes not all fields are updated…

Surrogate

  • Hero Member
  • *****
  • Posts: 1227
    • ShapeSheet™ Knowledge Base
Re: shapedata and conditional label
« Reply #4 on: February 24, 2021, 11:05:32 AM »
if you prefer I can provide a google drive link
IMHO it is best way, for investigation…

shinji7800

  • Jr. Member
  • **
  • Posts: 27
Re: shapedata and conditional label
« Reply #5 on: February 24, 2021, 12:29:06 PM »
For sharing .vss files ?

Surrogate

  • Hero Member
  • *****
  • Posts: 1227
    • ShapeSheet™ Knowledge Base
Re: shapedata and conditional label
« Reply #6 on: February 24, 2021, 12:36:46 PM »
Any kind of files…

shinji7800

  • Jr. Member
  • **
  • Posts: 27
Re: shapedata and conditional label
« Reply #7 on: February 26, 2021, 09:24:27 AM »
hi all ,

it seems that label and value cells don't like when there is calculation.

so I double rows and hide one of them conditionally. result is the same for user :)


I will post a video for additional exemple maybe it helps :)


best regards

 

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3974
  • Ideas Visio-lized into solutions
Re: shapedata and conditional label
« Reply #8 on: February 27, 2021, 12:58:21 AM »
Uploading the file would be helpful.

How are you transferring the information to the shape for display?  Are you using Insert>Field?
Visio 2019 Pro

shinji7800

  • Jr. Member
  • **
  • Posts: 27
Re: shapedata and conditional label
« Reply #9 on: February 27, 2021, 01:51:43 AM »
Hi

Yes I use  insert > field (ctrl + F9) > custom formula

For exemple on my initial non working test

Let shape A with props,

on shape B ctrl+F9 > custom formula

=shapeA!Props.row1.value


The alternative I find (even I will prefer the non working :D)

Is on shape A create an another props :

- let row1 for a specific case (imagine for daytime)
- let row2 for an another specific case (imagine for night time)

For the Each rows add if statement in “invisible” cell
- row1.invisible = IF(daytime, FALSE, RIGHT)
- row2.invisible = IF(daytime, RIGHT,FALSE)

on shape B ctrl+F9 > custom formula

=IF(daytime, shapeA!Props.row1.value,shapeA!Props.row2.value)


I will post files as soon I can :)

Hope it helps

Regards


Machine

  • Jr. Member
  • **
  • Posts: 18
Re: shapedata and conditional label
« Reply #10 on: May 27, 2021, 11:51:13 AM »
I'm pretty much sure I had similar situation long time ago.
Because of some reasons If-statement behaves like a Guard if shapes are grouped together.

What you could do, is to change Label via SETF/GetRef.
Basically force the Label change from the shape where you got your List (NRS;DRP).