Forum Discussion
_anomDiebolt_
9 years agoQrew Elite
The github page for QuickBaseClient.js hasn't been updated for five years:
https://github.com/QuickbaseAdmirer/Quickbase-JavaScript-SDK/wiki
And it references JavaScript version 1.2 which had a release date of 1997 (20 years ago!)
<script language="JavaScript1.2" src="/js/QuickBaseClient.js"></script>
https://en.wikipedia.org/wiki/JavaScript#Version_history
This library is so woefully out of date that is from the stone age. Using it will only hinder you.
https://github.com/QuickbaseAdmirer/Quickbase-JavaScript-SDK/wiki
And it references JavaScript version 1.2 which had a release date of 1997 (20 years ago!)
<script language="JavaScript1.2" src="/js/QuickBaseClient.js"></script>
https://en.wikipedia.org/wiki/JavaScript#Version_history
This library is so woefully out of date that is from the stone age. Using it will only hinder you.
- AndreonnaGarret9 years agoQrew Assistant CaptainI read all of those things. But I don't have any other suggestions to move forward with what I need.
Any ideas? - _anomDiebolt_9 years agoQrew EliteI am catching up with my shadow and have another busy week so my answers have to be short.
Can you generalize your problem in terms of what parameters would define the operation you want to carry out? They might even be the same parameters as the code I am telling you not to use but I don't the the time to search that source code. What I need to know are parameters such as the source and target dbid's, the clist of fids to be copied, and the related parent fid in the child table. It is easy to write the code but some thought has to go into identifying the parameters needed to define the task to be accomplished. - AndreonnaGarret9 years agoQrew Assistant CaptainSure!
I have 4 tables
PM Checklists: _DBID_PM_CHECKLISTS
PM Tasks: _DBID_PM_TASKS
Checklist Templates: _DBID_CHECKLIST_TEMPLATES
Task Templates: _DBID_PM_ITEMS
The task templates pull into the checklist templates.
There are 3 fields on the Task Template table.
Task (FID: 6)
Section (FID: 7)
Frequency (FID: 9)
The same 3 fields on the Task Template table are on the PM Tasks Table.
Task (FID: 6)
Section (FID: 7)
Frequency (FID: 8)
The Checklist Templates Table has 2 fields that pull into the PM Checklists table.
Template Type (FID: 20)
Status (FID: 25)
These feed into the PM Checklists table fields
PM Type (FID: 139)
Status (FID: 138)
I believe the idea here is that on the Checklist Template table I would press a button called "Generate from this Template". This would trigger the Checklist Template to copy over into the 2 fields on the _PM Checklists _table creating a new checklist. It would also pull the child records from the _Checklist Template_ (which are actually from the _Task Template_ table) over to the _PM Tasks _table and tie them to the _PM Checklists_ table as child records.
I hope I explained that well enough.
Thank you! - _anomDiebolt_9 years agoQrew EliteThis is helpful. I have a lot of other things competing for my time but this is easy enough to do step by step.
The information you provided is helpful but not quite what a developer would need to write the code. By parameterization I am referring to the set of parameters that would fully define what is to be copied from the target table to the source table. I am thinking this is the set of parameters that fully define the task:var source = {
dbidParent: "??????????",
dbidChild: "??????????",
clistParent: "20.25",
clistChild: "6.7.9",
relatedParent: "?"
}
var target = {
dbidParent: "??????????",
dbidChild: "??????????",
clistParent: "139.138",
clistChild: "6.7.8",
relatedParent: "?"
}
I actually don't need you to fill in the question marks as I will just write a generic script and you can fill in the relevant values to drive your usage of the script. Note that the "length" of the clistParent and clistChild have to be of the same length (same number of periods). In some cases the values for the clistParent, clistChild, and relatedParent would be identical between the source and target if the tables had identical schemas.
So before I write the code just confirm that this makes sense to you. - AndreonnaGarret9 years agoQrew Assistant CaptainThis does make sense to me. Thank you!
- _anomDiebolt_9 years agoQrew EliteI might add a new property named xformChild (ie transform) to the source which would be some type of period separated string indicating what transform (ie calculation) to perform in mapping a source field to a target field. This would allow for the application of a function to perform some type of calculation but would most commonly be used to increment a counter or calculate a new date and deposit it into the corresponding target field.
For example, this set of parameters would perform an "identity" transformation (ievar source = {
dbidParent: "??????????",
dbidChild: "??????????",
clistParent: "20.25",
clistChild: "6.7.9", xformChild: "1.1.1",
relatedParent: "?" }
While this set of parameters would indicate that the target field with fid=9 would receive an incremented value (1,2,3,4 ...):var source = {
var target = {
dbidParent: "??????????",
dbidChild: "??????????",
clistParent: "20.25",
clistChild: "0.6.7.9", xformChild: "Increment().1.1.1",
relatedParent: "?" }dbidParent: "??????????",
I have to give some thought to how to specify dates that should be incremented in terms of a base date and an incremental number of days, weeks, months, workdates etc.
dbidChild: "??????????",
clistParent: "139.138",
clistChild: "9.6.7.8",
relatedParent: "?" } - AndreonnaGarret9 years agoQrew Assistant CaptainI don't know that I need to be able to increment any fields. I really just need it to copy and paste into fields, like your first example.