Author Topic: variable in GetRef function  (Read 1043 times)

0 Members and 1 Guest are viewing this topic.


  • Jr. Member
  • **
  • Posts: 20
variable in GetRef function
« on: April 03, 2023, 09:51:39 PM »
Hi All,
I am trying to set up a shape that updates a user cell in the page shapesheet based on a user selectable field
When i drop the shape onto the page i have a prompt to select an ID from a fixed list. I.e A1
I then want a formula to set a field on the page shape sheet corresponding to A1

for example SetF(GetRef(ThePage!User.ID),Prop.Attenuation)
So if Prop.ID = A1, then the above would be SetF(GetRef(ThePage!User.A1),Prop.Attenuation)

How do i set a variable into the formula so i can change the ID and evaluate it correctly?



  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4837
  • Ideas Visio-lized into solutions
Re: variable in GetRef function
« Reply #1 on: April 04, 2023, 02:03:45 AM »
It looks like you need to setup a dummy entry in the User Section of the page shape sheet to accept the formula.

Let's say for sake of argument, it is User.Row_9.  In the User.Row_9 Value cell, enter this formula:
SETF(GetRef(User.ID),"=setf(getref(Sheet.1!User.set" & Sheet.1!Prop.ID & "),Sheet.1!Prop.Val)").  This ends up pushing this formula into the User.ID cell =>  SETF(GetRef(Sheet.1!User.set5),Sheet.1!Prop.Val) 

In my test case, Sheet.1!Prop.ID had value = 5, and my Sheet.1 has a User.set5 row.  Now edit the User.Row_9 formula to reflect your exact needs.
« Last Edit: April 04, 2023, 10:30:49 AM by wapperdude »
Visio 2019 Pro