Jump to content

Referencing VirtualField with weird alphanumeric appended to it by Caspio


Recommended Posts

Inspecting the webpage I see that caspio in some cases appends an alphanumeric code to a virtual field  ex: cbParamVirtual23_5cc2f7c259e4b5

I've read and used fairly successfully the following to reference the value:

 

document.querySelector('[id*=cbParamVirtual23]');

 

My question: is there a more explicit way to reference this virtual field?  Reason being the  asterisk is a wildcard and it gets messy when referencing cbParamVirtual2  if there is a cbParamVirtual23 present prior.  

Link to comment
Share on other sites

Thanks Vitaliksssss.  however, is there a way to capture and reference the alphanumeric key that's appended? 

 

I have a use case where i'm using the following fields in my table:
- fno1_paytype
- fno1_Start_Time
- fno1_End_Time
- fno1

I'm having trouble accessing fno1 because  

document.querySelector("[id*=InsertRecordfno1_]"); 

  isn't catching the correct field :(

Ultimately I may have to rename fields, but since I have a lot of javascript, as well as multiple datapages already built and working which references the above table fields, renaming would be a worst case scenario. 

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...