Community
Dynamic Blocks Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Lookup Attribute Empty String

13 REPLIES 13
Reply
Message 1 of 14
ChrisBatt
1364 Views, 13 Replies

Lookup Attribute Empty String

I have created a dynamic block that has visibility states and 4 lookups.  Each lookup action is tied to two lookup parameters.  The first parameter is a single word string and the second is a single letter corresponding to that word.  The 4 lookup single letters are then displayed in an attribute called ALPHA.  The lookup tables point to the x,y locations of some invisible points so that the lookup will chain appropriately and set the values so that when the user performs a regen it will update the fields with the new letters in the ALPHA attribute.  My problem is that I would like to allow the user to select a blank or empty string in any one of the four lookups.  I tried putting a "BLANK" selection for the user and leaving the cell empty in the letter lookup of the action, but this just puts four dashes "----" in place of the empty string that I had.  Is there a way to change the "----" to empty string "" or to allow the user to select something that will be empty string ""?  I'm attaching a screen shot and the block in case some one has a better idea of how to implement this or can show me how to get an empty string for a user selection.  Thanks for all of the help.

13 REPLIES 13
Message 2 of 14
Libbya
in reply to: ChrisBatt

Just put a space in the value for the lookup table.

 

When inserted, your block currently has the value of 'Custom' for each of its lookups.  To avoid that situation, you need the base location of your input points to match a value on your table.  Right now they appear to be placed freehand and so, their position X and position Y values do not correspond to a value on the lookup tables and the various lookups display 'Custom'.  

Message 3 of 14
Libbya
in reply to: Libbya

If you cannot have a space in the attribute let me know.  There is a way to do it, but it is a bit more complicated.

Message 4 of 14
ChrisBatt
in reply to: Libbya

Thanks for the input.  I tried the space and that won't do.  It would be better if it is a empty or blank string if that is possible.  I did change the base input points to a location that is acceptable in the lookup table so that will help with my default values.

Message 5 of 14
Libbya
in reply to: ChrisBatt

If the string field is displayed and the string is empty then it will display the "----" .  The way that I mentioned before would require 15 attributes and an additional 75 visibility states.  The 15 attributes would be the various permutations of the ALPHA attribute with one, two or three of the fields deleted.  You then create a visibility state that displays each of those individual attributes with the FIELD visibility state, then each of the 15 with the GENERIC visbility state, etc...  Then insert a double lookup and use your two invisible points as inputs on one table and switch the visbility state with the other.  In order to get it to all work properly you will need to turn off the grip on the current visibility parameter and add another lookup table to simulate it and have that lookup move one more invisible point in order to give the input value for the visibility. 

Message 6 of 14
ojuris
in reply to: Libbya

hi!

 

if I understand what You want, write   ALT+0160  instead of    Space and You don't see  ----

 

Juris

Message 7 of 14
Libbya
in reply to: ojuris

I don't think that is what he is looking for.  With the value of Alt+0160 for blank, when it is selected, it displays a space.  In other words, when the values of the lookups are ANALYSIS, BLANK, CONTROLLER, VALVE then the attribute displays "A CV" rather than "ACV".

Message 8 of 14
Libbya
in reply to: Libbya

Another option would be to create one more lookup parameter/action with no grips.  Add the ALPHA1 X, ALPHA1 Y, ALPHA2 X and ALPHA2 Y as input values.  Create a table with all the permutations for the input properties and then for Lookup Properties type in the corresponding desired displayed value.  Then in the ALPHA attribute, display the field for that additional lookup instead of the four fields for the individual lookups.  Creating the table would be a bit of a PITA, but not terrible.  It would need 383 rows.

 

Message 9 of 14
ChrisBatt
in reply to: Libbya

That is correct that the space or ALT+0162 wouldn't work correctly.  I think I follow what you mean with the hidden lookup, but how does the block table work into that?   I see that I would have to create all of the permutations somewhere which to me looks like it would be in the hidden lookup.  Unless I can somehow link the block table into the lookup that I am unaware of.  

Message 10 of 14
Libbya
in reply to: ChrisBatt

You wouldn't use a block table.  When I mentioned creating a table I meant creating the hidden lookup table.  

Message 11 of 14
ChrisBatt
in reply to: Libbya

I see.  I think my mind just jumped to block table with that explanation.  Now I'm not sure which is better for me to implement.  The first suggeston with a faux visibility selection through a lookup or just creating the massive lookup table.  Ultimately I would like to be able to include an empty string state where the user could select blank for all four letters which would allow them to type in something in the ALPHA attribute without destroying the field.  I don't think this is possible with the current limitations of dynamic blocks.  It would just be simpler if they would allow the user to have a blank string in the lookup table though I can understand why they don't.

Message 12 of 14
ChrisBatt
in reply to: ChrisBatt

I think I found a better solution that will make this work for me.  I was looking at our font and it is simplex which doesn't support unicode characters.  If we were to switch to a unicode font, then I can go back to my original block, remove all of the complex lookup table or chained visibility, and change the BLANK on the lookup table for each of the 4 letter selections to have a zero width non joiner unicode character.  This can be found by a right click in the lookup table properties and insert a unicode character.  I attached a picture of this.  This allows a character that looks like an empty string but allows the field to be retained when the user selects my BLANK for each letter.  Definitely learning more than I bargained for today...

Message 13 of 14
Libbya
in reply to: ChrisBatt

That sounds like an excellent solution.  You could still add a user-editable attribute and faux visibility so that when all the current lookups are set to BLANK it switches the visibility state to show the user-editable attribute instead of the one that has the fields.  That would require the addition of another 5 visibility states, another invisible move and a double lookup.

Message 14 of 14
ChrisBatt
in reply to: Libbya

That is a great idea to keep the field from being deleted when the user sets them all to blank.  I appreciate all of the suggestions.  I will try to get back to this next week after my days off.  Thanks.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

”Boost

 

”Tips

 

”Services